nerdexam
Microsoft

DP-100 · Question #205

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…

The correct answer is D. best_model = automl_run.get_output()[1]. The get_output() method on an AutoML run returns a tuple of (best_run, fitted_model). Using index [1] retrieves the actual fitted model object ready for use or registration. The other options return different things: get_details() (A) returns a dictionary of run metadata and…

Train and deploy models

Question

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: 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?

Options

  • Abest_model = automl_run.get_details()
  • Bbest_model = automl_run.get_metrics()
  • Cbest_model = automl_run.get_file_names()[1]
  • Dbest_model = automl_run.get_output()[1]

How the community answered

(54 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    7% (4)
  • D
    87% (47)

Explanation

The get_output() method on an AutoML run returns a tuple of (best_run, fitted_model). Using index [1] retrieves the actual fitted model object ready for use or registration. The other options return different things: get_details() (A) returns a dictionary of run metadata and configuration; get_metrics() (B) returns a dictionary of performance metrics like accuracy and AUC; get_file_names() (C) returns a list of output file paths stored by the run, not the model object itself. Only get_output()[1] directly returns the best fitted model.

Topics

#AutoML#Azure Machine Learning SDK#Model Selection#Training Output

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice