Exam Certified Machine Learning Professional All QuestionsBrowse all questions from this exam
Question 27

A data scientist has written a function to track the runs of their random forest model. The data scientist is changing the number of trees in the forest across each run.

Which of the following MLflow operations is designed to log single values like the number of trees in a random forest?

    Correct Answer: D

    To log single values like the number of trees in a random forest, the appropriate MLflow operation is mlflow.log_param. This function is designed to log parameters or hyperparameters of a model, such as the number of trees, learning rate, or any other configuration value.

Discussion
hugodscarvalhoOption: D

Using mlflow.log_param, the data scientist can easily track and record the number of trees in the random forest model across different runs. Doc: https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.log_param

random_data_guyOption: D

Log a parameter (e.g. model hyperparameter) under the current run. https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.log_param

trendy01Option: D

mlflow.log_param("num_trees", num_trees)

BokNinjaOption: D

import mlflow # Start a new MLflow run with mlflow.start_run(): # Log the parameter mlflow.log_param("num_trees", num_trees)

BokNinja

Which makes it D