DP-100 Exam Question 131

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You plan to use a Python script to run an Azure Machine Learning experiment. The script creates a reference to the experiment run context, loads data from a file, identifies the set of unique values for the label column, and completes the experiment run:
from azureml.core import Run
import pandas as pd
run = Run.get_context()
data = pd.read_csv('data.csv')
label_vals = data['label'].unique()
# Add code to record metrics here
run.complete()
The experiment must record the unique labels in the data as metrics for the run that can be reviewed later.
You must add code to the script to record the unique label values as run metrics at the point indicated by the comment.
Solution: Replace the comment with the following code:
run.log_table('Label Values', label_vals)
Does the solution meet the goal?
  • DP-100 Exam Question 132

    You create an experiment in Azure Machine Learning Studio. You add a training dataset that contains 10,000 rows. The first 9,000 rows represent class 0 (90 percent).
    The remaining 1,000 rows represent class 1 (10 percent).
    The training set is imbalances between two classes. You must increase the number of training examples for class 1 to 4,000 by using 5 data rows. You add the Synthetic Minority Oversampling Technique (SMOTE) module to the experiment.
    You need to configure the module.
    Which values should you use? To answer, select the appropriate options in the dialog box in the answer area.
    NOTE: Each correct selection is worth one point.

    DP-100 Exam Question 133

    You are running a training experiment on remote compute in Azure Machine Learning.
    The experiment is configured to use a conda environment that includes the mlflow and azureml-contrib-run packages.
    You must use MLflow as the logging package for tracking metrics generated in the experiment.
    You need to complete the script for the experiment.
    How should you complete the code? To answer, select the appropriate options in the answer area.
    NOTE: Each correct selection is worth one point.

    DP-100 Exam Question 134

    For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.

    DP-100 Exam Question 135

    You are solving a classification task.
    You must evaluate your model on a limited data sample by using k-fold cross-validation. You start by configuring a k parameter as the number of splits.
    You need to configure the k parameter for the cross-validation.
    Which value should you use?