Certified Machine Learning Professional Exam QuestionsBrowse all questions from this exam

Certified Machine Learning Professional 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?

Show Answer
Correct Answer: CD

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

4 comments
Sign in to comment
BokNinjaOption: D
Dec 19, 2023

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

BokNinja
Dec 19, 2023

Which makes it D

trendy01Option: D
Dec 27, 2023

mlflow.log_param("num_trees", num_trees)

random_data_guyOption: D
Dec 27, 2023

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

hugodscarvalhoOption: D
Jan 27, 2024

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