QuestionQ23

VerifiedAdvanced MLflow Usage

A data scientist needs to track runs for a random forest model. Across each run, the scientist changes the number of trees and the maximum tree depth in the forest.

They write the following code:

Question Image

Which Python object type must params be an instance of?

Explanation

params must be a dictionary because **params unpacks dictionary key-value pairs into keyword arguments for RandomForestRegressor, and mlflow.log_params accepts a dictionary of parameter names and values. This supports logging hyperparameters such as the number of estimators and maximum depth for each run.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!