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

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

List of questions

Question 151

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 create a model to forecast weather conditions based on historical data.

You need to create a pipeline that runs a processing script to load data from a datastore and pass the processed data to a machine learning model training script.

Solution: Run the following code:

Microsoft DP-100 image Question 42 89142 10022024015825000000

Does the solution meet the goal?

Yes
Yes
No
No
Suggested answer: B
Explanation:

Note: Data used in pipeline can be produced by one step and consumed in another step by providing a PipelineData object as an output of one step and an input of one or more subsequent steps.

Compare with this example, the pipeline train step depends on the process_step_output output of the pipeline process step:

from azureml.pipeline.core import Pipeline, PipelineData

from azureml.pipeline.steps import PythonScriptStep

datastore = ws.get_default_datastore()

process_step_output = PipelineData("processed_data", datastore=datastore)

process_step = PythonScriptStep(script_name="process.py",

arguments=["--data_for_train", process_step_output],

outputs=[process_step_output],

compute_target=aml_compute,

source_directory=process_directory)

train_step = PythonScriptStep(script_name="train.py",

arguments=["--data_for_train", process_step_output],

inputs=[process_step_output],

compute_target=aml_compute,

source_directory=train_directory)

pipeline = Pipeline(workspace=ws, steps=[process_step, train_step])

Reference:

https://docs.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.pipelinedata?view=azure-ml-py

asked 02/10/2024
Mohamed Ramez Hamad
38 questions

Question 152

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 43 89143 10022024015825000000

Does the solution meet the goal?

Yes
Yes
No
No
Suggested answer: A
Explanation:

The scikit-learn estimator provides a simple way of launching a scikit-learn training job on a compute target. It is implemented through the SKLearn class, which can be used to support single-node CPU training.

Example:

from azureml.train.sklearn import SKLearn

}

estimator = SKLearn(source_directory=project_folder,

compute_target=compute_target,

entry_script='train_iris.py'

)

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-train-scikit-learn

asked 02/10/2024
Yosra Chabchoub
44 questions

Question 153

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 44 89144 10022024015825000000

Does the solution meet the goal?

Yes
Yes
No
No
Suggested answer: B
Explanation:

The scikit-learn estimator provides a simple way of launching a scikit-learn training job on a compute target. It is implemented through the SKLearn class, which can be used to support single-node CPU training.

Example:

from azureml.train.sklearn import SKLearn

}

estimator = SKLearn(source_directory=project_folder, compute_target=compute_target,

entry_script='train_iris.py' )

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-train-scikit-learn

asked 02/10/2024
xun wang
46 questions

Question 154

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 45 89145 10022024015825000000

Does the solution meet the goal?

Yes
Yes
No
No
Suggested answer: B
Explanation:

The scikit-learn estimator provides a simple way of launching a scikit-learn training job on a compute target. It is implemented through the SKLearn class, which can be used to support single-node CPU training.

Example:

from azureml.train.sklearn import SKLearn

}

estimator = SKLearn(source_directory=project_folder, compute_target=compute_target,

entry_script='train_iris.py' )

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-train-scikit-learn

asked 02/10/2024
Raed Abu-Haija
41 questions

Question 155

Report Export Collapse

You create a multi-class image classification deep learning model that uses a set of labeled images. You create a script file named train.py that uses the PyTorch 1.3 framework to train the model.

You must run the script by using an estimator. The code must not require any additional Python libraries to be installed in the environment for the estimator. The time required for model training must be minimized.

You need to define the estimator that will be used to run the script.

Which estimator type should you use?

TensorFlow
TensorFlow
PyTorch
PyTorch
SKLearn
SKLearn
Estimator
Estimator
Suggested answer: B
Explanation:

For PyTorch, TensorFlow and Chainer tasks, Azure Machine Learning provides respective PyTorch, TensorFlow, and Chainer estimators to simplify using these frameworks.

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-train-ml-models

asked 02/10/2024
Marc Codó
47 questions

Question 156

Report Export Collapse

You create a pipeline in designer to train a model that predicts automobile prices.

Because of non-linear relationships in the data, the pipeline calculates the natural log (Ln) of the prices in the training data, trains a model to predict this natural log of price value, and then calculates the exponential of the scored label to get the predicted price.

The training pipeline is shown in the exhibit. (Click the Training pipeline tab.)

Training pipeline

Microsoft DP-100 image Question 47 89147 10022024015825000000

You create a real-time inference pipeline from the training pipeline, as shown in the exhibit. (Click the Real-time pipeline tab.)

Real-time pipeline

Microsoft DP-100 image Question 47 89147 10022024015825000000You need to modify the inference pipeline to ensure that the web service returns the exponential of the scored label as the predicted automobile price and that client applications are not required to include a price value in the input values.

Which three modifications must you make to the inference pipeline? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

Connect the output of the Apply SQL Transformation to the Web Service Output module.
Connect the output of the Apply SQL Transformation to the Web Service Output module.
Replace the Web Service Input module with a data input that does not include the price column.
Replace the Web Service Input module with a data input that does not include the price column.
Add a Select Columns module before the Score Model module to select all columns other than price.
Add a Select Columns module before the Score Model module to select all columns other than price.
Replace the training dataset module with a data input that does not include the price column.
Replace the training dataset module with a data input that does not include the price column.
Remove the Apply Math Operation module that replaces price with its natural log from the data flow.
Remove the Apply Math Operation module that replaces price with its natural log from the data flow.
Remove the Apply SQL Transformation module from the data flow.
Remove the Apply SQL Transformation module from the data flow.
Suggested answer: A, C, E
asked 02/10/2024
Hayat Hassan
49 questions

Question 157

Report Export Collapse

You are creating a classification model for a banking company to identify possible instances of credit card fraud. You plan to create the model in Azure Machine Learning by using automated machine learning.

The training dataset that you are using is highly unbalanced.

You need to evaluate the classification model.

Which primary metric should you use?

normalized_mean_absolute_error
normalized_mean_absolute_error
AUC_weighted
AUC_weighted
accuracy
accuracy
normalized_root_mean_squared_error
normalized_root_mean_squared_error
spearman_correlation
spearman_correlation
Suggested answer: B
Explanation:

AUC_weighted is a Classification metric.

Note: AUC is the Area under the Receiver Operating Characteristic Curve. Weighted is the arithmetic mean of the score for each class, weighted by the number of true instances in each class.

Incorrect Answers:

A: normalized_mean_absolute_error is a regression metric, not a classification metric.

C: When comparing approaches to imbalanced classification problems, consider using metrics beyond accuracy such as recall, precision, and AUROC. It may be that switching the metric you optimize for during parameter selection or model selection is enough to provide desirable performance detecting the minority class.

D: normalized_root_mean_squared_error is a regression metric, not a classification metric.

Reference:

https://docs.microsoft.com/en-us/azure/machine-learning/how-to-understand-automated-ml

asked 02/10/2024
Alexandru Ouatu
51 questions

Question 158

Report Export Collapse

You create a machine learning model by using the Azure Machine Learning designer. You publish the model as a real-time service on an Azure Kubernetes Service (AKS) inference compute cluster. You make no change to the deployed endpoint configuration.

You need to provide application developers with the information they need to consume the endpoint.

Which two values should you provide to application developers? Each correct answer presents part of the solution.

NOTE: Each correct selection is worth one point.

The name of the AKS cluster where the endpoint is hosted.
The name of the AKS cluster where the endpoint is hosted.
The name of the inference pipeline for the endpoint.
The name of the inference pipeline for the endpoint.
The URL of the endpoint.
The URL of the endpoint.
The run ID of the inference pipeline experiment for the endpoint.
The run ID of the inference pipeline experiment for the endpoint.
The key for the endpoint.
The key for the endpoint.
Suggested answer: C, E
Explanation:

Deploying an Azure Machine Learning model as a web service creates a REST API endpoint. You can send data to this endpoint and receive the prediction returned by the model.

You create a web service when you deploy a model to your local environment, Azure Container Instances, Azure Kubernetes Service, or field-programmable gate arrays (FPGA). You retrieve the URI used to access the web service by using the Azure Machine Learning SDK. If authentication is enabled, you can also use the SDK to get the authentication keys or tokens.

Example:

# URL for the web service

scoring_uri = '<your web service URI>'

# If the service is authenticated, set the key or token key = '<your key or token>'

Reference: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-consume-web-service

asked 02/10/2024
Luis Hernaiz
44 questions

Question 159

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 create a model to forecast weather conditions based on historical data.

You need to create a pipeline that runs a processing script to load data from a datastore and pass the processed data to a machine learning model training script.

Solution: Run the following code:

Microsoft DP-100 image Question 50 89150 10022024015825000000

Does the solution meet the goal?

Yes
Yes
No
No
Suggested answer: A
Explanation:

The two steps are present: process_step and train_step Data_input correctly references the data in the data store.

Note:

Data used in pipeline can be produced by one step and consumed in another step by providing a PipelineData object as an output of one step and an input of one or more subsequent steps.

PipelineData objects are also used when constructing Pipelines to describe step dependencies. To specify that a step requires the output of another step as input, use a PipelineData object in the constructor of both steps.

For example, the pipeline train step depends on the process_step_output output of the pipeline process step:

from azureml.pipeline.core import Pipeline, PipelineData from azureml.pipeline.steps import PythonScriptStep

datastore = ws.get_default_datastore()

process_step_output = PipelineData("processed_data", datastore=datastore) process_step = PythonScriptStep(script_name="process.py", arguments=["--data_for_train", process_step_output], outputs=

[process_step_output], compute_target=aml_compute, source_directory=process_directory)

train_step = PythonScriptStep(script_name="train.py", arguments=["--data_for_train", process_step_output], inputs=[process_step_output], compute_target=aml_compute, source_directory=train_directory)

pipeline = Pipeline(workspace=ws, steps=[process_step, train_step])

Reference:

https://docs.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.pipelinedata?view=azure-ml-py

asked 02/10/2024
vinoth inigo
46 questions

Question 160

Report Export Collapse

You run an experiment that uses an AutoMLConfig class to define an automated machine learning task with a maximum of ten model training iterations. The task will attempt to find the best performing model based on a metric named accuracy.

You submit the experiment with the following code:

Microsoft DP-100 image Question 51 89151 10022024015825000000

You need to create Python code that returns the best model that is generated by the automated machine learning task.

Which code segment should you use?

best_model = automl_run.get_details()
best_model = automl_run.get_details()
best_model = automl_run.get_metrics()
best_model = automl_run.get_metrics()
best_model = automl_run.get_file_names()[1]
best_model = automl_run.get_file_names()[1]
best_model = automl_run.get_output()[1]
best_model = automl_run.get_output()[1]
Suggested answer: D
Explanation:

The get_output method returns the best run and the fitted model.

Reference:

https://notebooks.azure.com/azureml/projects/azureml-getting-started/html/how-to-use-azureml/automated-machine-learning/classification/auto-ml-classification.ipynb

asked 02/10/2024
Alysson Rodrigo Freires Neto
49 questions
Total 433 questions
Go to page: of 44
Search

Related questions