Exam4Training

How should you complete the code?

DRAG DROP

You plan to explore demographic data for home ownership in various cities.

The data is in a CSV file with the following format:

age,city,income,home_owner

21, Chicago, 50000,0

35, Seattle, 120000,1

23, Seattle, 65000,0

45, Seattle, 130000,1

18, Chicago, 48000,0

You need to run an experiment in your Azure Machine Learning workspace to explore the data and log the results.

The experiment must log the following information:

✑ the number of observations in the dataset

✑ a box plot of income by home_owner

✑ a dictionary containing the city names and the average income for each city

You need to use the appropriate logging methods of the experiment’s run object to log the required information.

How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content. NOTE: Each correct selection is worth one point.

Answer:

Explanation:

Box 1: log

The number of observations in the dataset.

run.log (name, value, description=”)

Scalar values: Log a numerical or string value to the run with the given name. Logging a metric to a run causes that metric to be stored in the run record in the experiment. You can log the same metric multiple times within a run, the result being considered a vector of that metric.

Example: run.log ("accuracy", 0.95)

Box 2: log_image

A box plot of income by home_owner.

log_image Log an image to the run record. Use log_image to log a .PNG image file or a matplotlib plot to the run. These images will be visible and comparable in the run record.

Example: run.log_image("ROC", plot=plt)

Box 3: log_table

A dictionary containing the city names and the average income for each city.

log_table: Log a dictionary object to the run with the given name.

Latest DP-100 Dumps Valid Version with 227 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version