ExamGecko
Home / Microsoft / DP-100 / List of questions
Ask Question

Microsoft DP-100 Practice Test - Questions Answers, Page 17

List of questions

Question 161

Report Export Collapse

You plan to use the Hyperdrive feature of Azure Machine Learning to determine the optimal hyperparameter values when training a model.

You must use Hyperdrive to try combinations of the following hyperparameter values. You must not apply an early termination policy.

learning_rate: any value between 0.001 and 0.1

batch_size: 16, 32, or 64

You need to configure the sampling method for the Hyperdrive experiment.

Which two sampling methods can you use? Each correct answer is a complete solution.

NOTE: Each correct selection is worth one point.

No sampling
No sampling
Grid sampling
Grid sampling
Bayesian sampling
Bayesian sampling
Random sampling
Random sampling
Suggested answer: C, D
Explanation:

C: Bayesian sampling is based on the Bayesian optimization algorithm and makes intelligent choices on the hyperparameter values to sample next. It picks the sample based on how the previous samples performed, such that the new sample improves the reported primary metric.

Bayesian sampling does not support any early termination policy

Example:

from azureml.train.hyperdrive import BayesianParameterSampling

from azureml.train.hyperdrive import uniform, choice

param_sampling = BayesianParameterSampling( {

"learning_rate": uniform(0.05, 0.1),

"batch_size": choice(16, 32, 64, 128)

}

)

D: In random sampling, hyperparameter values are randomly selected from the defined search space. Random sampling allows the search space to include both discrete and continuous hyperparameters.

Incorrect Answers:

B: Grid sampling can be used if your hyperparameter space can be defined as a choice among discrete values and if you have sufficient budget to exhaustively search over all values in the defined search space. Additionally, one can use automated early termination of poorly performing runs, which reduces wastage of resources.

Example, the following space has a total of six samples:

from azureml.train.hyperdrive import GridParameterSampling

from azureml.train.hyperdrive import choice

param_sampling = GridParameterSampling( {

"num_hidden_layers": choice(1, 2, 3),

"batch_size": choice(16, 32)

}

)

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters

asked 02/10/2024
Riaan Cilliers
36 questions

Question 162

Report Export Collapse

You are training machine learning models in Azure Machine Learning. You use Hyperdrive to tune the hyperparameter.

In previous model training and tuning runs, many models showed similar performance.

You need to select an early termination policy that meets the following requirements:

accounts for the performance of all previous runs when evaluating the current run

avoids comparing the current run with only the best performing run to date

Which two early termination policies should you use? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Median stopping
Median stopping
Bandit
Bandit
Default
Default
Truncation selection
Truncation selection
Suggested answer: A, D
Explanation:

The Median Stopping policy computes running averages across all runs and cancels runs whose best performance is worse than the median of the running averages.If no policy is specified, the hyperparameter tuning service will let all training runs execute to completion.

Reference:https://docs.microsoft.com/en-us/python/api/azureml-train- core/azureml.train.hyperdrive.medianstoppingpolicy

https://docs.microsoft.com/en-us/python/api/azureml-train- core/azureml.train.hyperdrive.truncationselectionpolicy

https://docs.microsoft.com/en-us/python/api/azureml-train- core/azureml.train.hyperdrive.banditpolicy

asked 02/10/2024
Manohar M
44 questions

Question 163

Report Export Collapse

You use the Azure Machine Learning SDK in a notebook to run an experiment using a script file in an experiment folder.

The experiment fails.

You need to troubleshoot the failed experiment.

What are two possible ways to achieve this goal? Each correct answer presents a complete solution.

Use the get_metrics() method of the run object to retrieve the experiment run logs.
Use the get_metrics() method of the run object to retrieve the experiment run logs.
Use the get_details_with_logs() method of the run object to display the experiment run logs.
Use the get_details_with_logs() method of the run object to display the experiment run logs.
View the log files for the experiment run in the experiment folder.
View the log files for the experiment run in the experiment folder.
View the logs for the experiment run in Azure Machine Learning studio.
View the logs for the experiment run in Azure Machine Learning studio.
Use the get_output() method of the run object to retrieve the experiment run logs.
Use the get_output() method of the run object to retrieve the experiment run logs.
Suggested answer: B, D
Explanation:

Use get_details_with_logs() to fetch the run details and logs created by the run.

You can monitor Azure Machine Learning runs and view their logs with the Azure Machine Learning studio.

Incorrect Answers:

A: You can view the metrics of a trained model using run.get_metrics(). E: get_output() gets the output of the step as PipelineData.

Reference:

https://docs.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.steprun https://docs.microsoft.com/en-us/azure/machine-learning/how-to-monitor-view-training-logs

asked 02/10/2024
Han Valk
50 questions

Question 164

Report Export Collapse

You use the Two-Class Neural Network module in Azure Machine Learning Studio to build a binary classification model. You use the Tune Model Hyperparameters module to tune accuracy for the model.

You need to configure the Tune Model Hyperparameters module.

Which two values should you use? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Number of hidden nodes
Number of hidden nodes
Learning Rate
Learning Rate
The type of the normalizer
The type of the normalizer
Number of learning iterations
Number of learning iterations
Hidden layer specification
Hidden layer specification
Suggested answer: D, E
Explanation:

D: For Number of learning iterations, specify the maximum number of times the algorithm should process the training cases.

E: For Hidden layer specification, select the type of network architecture to create.

Between the input and output layers you can insert multiple hidden layers. Most predictive tasks can be accomplished easily with only one or a few hidden layers.

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/studio-module-reference/two-class-neural-network

asked 02/10/2024
Jim Swift
39 questions

Question 165

Report Export Collapse

You create a binary classification model by using Azure Machine Learning Studio.

You must tune hyperparameters by performing a parameter sweep of the model. The parameter sweep must meet the following requirements:

iterate all possible combinations of hyperparameters

minimize computing resources required to perform the sweep

You need to perform a parameter sweep of the model.

Which parameter sweep mode should you use?

Random sweep
Random sweep
Sweep clustering
Sweep clustering
Entire grid
Entire grid
Random grid
Random grid
Suggested answer: D
Explanation:

Maximum number of runs on random grid: This option also controls the number of iterations over a random sampling of parameter values, but the values are not generated randomly from the specified range; instead, a matrix is created of all possible combinations of parameter values and a random sampling is taken over the matrix. This method is more efficient and less prone to regional oversampling or undersampling.

If you are training a model that supports an integrated parameter sweep, you can also set a range of seed values to use and iterate over the random seeds as well. This is optional, but can be useful for avoiding bias introduced by seed selection.

Incorrect Answers:

B: If you are building a clustering model, use Sweep Clustering to automatically determine the optimum number of clusters and other parameters.

C: Entire grid: When you select this option, the module loops over a grid predefined by the system, to try different combinations and identify the best learner. This option is useful for cases where you don't know what the best parameter settings might be and want to try all possible combination of values.

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/studio-module-reference/tune-model-hyperparameters

asked 02/10/2024
Donna Brown
44 questions

Question 166

Report Export Collapse

You are building a recurrent neural network to perform a binary classification.

You review the training loss, validation loss, training accuracy, and validation accuracy for each training epoch.

You need to analyze model performance.

You need to identify whether the classification model is overfitted.

Which of the following is correct?

The training loss stays constant and the validation loss stays on a constant value and close to the training loss value when training the model.
The training loss stays constant and the validation loss stays on a constant value and close to the training loss value when training the model.
The training loss decreases while the validation loss increases when training the model.
The training loss decreases while the validation loss increases when training the model.
The training loss stays constant and the validation loss decreases when training the model.
The training loss stays constant and the validation loss decreases when training the model.
The training loss increases while the validation loss decreases when training the model.
The training loss increases while the validation loss decreases when training the model.
Suggested answer: B
Explanation:

An overfit model is one where performance on the train set is good and continues to improve, whereas performance on the validation set improves to a point and then begins to degrade.

Reference:

https://machinelearningmastery.com/diagnose-overfitting-underfitting-lstm-models/

asked 02/10/2024
Joshua Muentes
51 questions

Question 167

Report Export Collapse

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 have a Python script named train.py in a local folder named scripts. The script trains a regression model by using scikit-learn. The script includes code to load a training data file which is also located in the scripts folder.

You must run the script as an Azure ML experiment on a compute cluster named aml-compute.

You need to configure the run to ensure that the environment includes the required packages for model training. You have instantiated a variable named aml-compute that references the target compute cluster.

Solution: Run the following code:

Microsoft DP-100 image Question 58 89158 10022024015825000000

Does the solution meet the goal?

Yes
Yes
No
No
Suggested answer: B
Explanation:

There is a missing line: conda_packages=['scikit-learn'], which is needed.

Correct example:

sk_est = Estimator(source_directory='./my-sklearn-proj',

script_params=script_params,

compute_target=compute_target,

entry_script='train.py',

conda_packages=['scikit-learn'])

Note:

The Estimator class represents a generic estimator to train data using any supplied framework.

This class is designed for use with machine learning frameworks that do not already have an Azure Machine Learning pre-configured estimator. Pre-configured estimators exist for Chainer, PyTorch, TensorFlow, and SKLearn.

Example:

from azureml.train.estimator import Estimator

script_params = {

# to mount files referenced by mnist dataset

'--data-folder': ds.as_named_input('mnist').as_mount(),

'--regularization': 0.8

}

Reference:

https://docs.microsoft.com/en-us/python/api/azureml-train-core/azureml.train.estimator.estimator

asked 02/10/2024
Jeremiah Hutchins
54 questions

Question 168

Report Export Collapse

You are performing clustering by using the K-means algorithm.

You need to define the possible termination conditions.

Which three conditions can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Centroids do not change between iterations.
Centroids do not change between iterations.
The residual sum of squares (RSS) rises above a threshold.
The residual sum of squares (RSS) rises above a threshold.
The residual sum of squares (RSS) falls below a threshold.
The residual sum of squares (RSS) falls below a threshold.
A fixed number of iterations is executed.
A fixed number of iterations is executed.
The sum of distances between centroids reaches a maximum.
The sum of distances between centroids reaches a maximum.
Suggested answer: A, C, D
Explanation:

AD: The algorithm terminates when the centroids stabilize or when a specified number of iterations are completed.

C: A measure of how well the centroids represent the members of their clusters is the residual sum of squares or RSS, the squared distance of each vector from its centroid summed over all vectors. RSS is the objective function and our goal is to minimize it.

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/studio-module-reference/k-means-clustering https://nlp.stanford.edu/IR-book/html/htmledition/k-means-1.html

asked 02/10/2024
Victor Platonov
39 questions

Question 169

Report Export Collapse

You are building a machine learning model for translating English language textual content into French language textual content.

You need to build and train the machine learning model to learn the sequence of the textual content.

Which type of neural network should you use?

Multilayer Perceptions (MLPs)
Multilayer Perceptions (MLPs)
Convolutional Neural Networks (CNNs)
Convolutional Neural Networks (CNNs)
Recurrent Neural Networks (RNNs)
Recurrent Neural Networks (RNNs)
Generative Adversarial Networks (GANs)
Generative Adversarial Networks (GANs)
Suggested answer: C
Explanation:

To translate a corpus of English text to French, we need to build a recurrent neural network (RNN).

Note: RNNs are designed to take sequences of text as inputs or return sequences of text as outputs, or both. They're called recurrent because the network's hidden layers have a loop in which the output and cell state from each time step become inputs at the next time step. This recurrence serves as a form of memory. It allows contextual information to flow through the network so that relevant outputs from previous time steps can be applied to network operations at the current time step.

Reference: https://towardsdatascience.com/language-translation-with-rnns-d84d43b40571

asked 02/10/2024
Robert Pila
41 questions

Question 170

Report Export Collapse

You create a binary classification model.

You need to evaluate the model performance.

Which two metrics can you use? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

relative absolute error
relative absolute error
precision
precision
accuracy
accuracy
mean absolute error
mean absolute error
coefficient of determination
coefficient of determination
Suggested answer: B, C
Explanation:

The evaluation metrics available for binary classification models are: Accuracy, Precision, Recall, F1 Score, and AUC.

Note: A very natural question-is: 'Out of the individuals whom the model, how many were classified correctly (TP)?'

This question-can be answered by looking at the Precision of the model, which is the proportion of positives that are classified correctly.

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/studio/evaluate-model-performance

asked 02/10/2024
martijn Spelt
46 questions
Total 433 questions
Go to page: of 44
Search

Related questions