Certified Machine Learning Professional Exam QuestionsBrowse all questions from this exam

Certified Machine Learning Professional Exam - Question 12


A data scientist has developed and logged a scikit-learn random forest model model, and then they ended their Spark session and terminated their cluster. After starting a new cluster, they want to review the feature_importances_ of the original model object.

Which of the following lines of code can be used to restore the model object so that feature_importances_ is available?

Show Answer
Correct Answer: AC

To restore a scikit-learn random forest model and access its feature_importances_ attribute, the appropriate function to use is mlflow.sklearn.load_model(model_uri). This function is specifically designed to load models built using scikit-learn.

Discussion

5 comments
Sign in to comment
BokNinjaOption: C
Dec 19, 2023

The correct answer is C. mlflow.sklearn.load_model(model_uri)

trendy01Option: C
Dec 27, 2023

C. mlflow.sklearn.load_model(model_uri) for two different case, write different code 1. sklean : mlflow.sklearn.load_model(model_uri) 2. xgboost : mlflow.xgboost.load_model(model_uri)

random_data_guyOption: C
Dec 27, 2023

https://mlflow.org/docs/latest/python_api/mlflow.sklearn.html#mlflow.sklearn.load_model

hugodscarvalhoOption: C
Jan 27, 2024

This line of code loads the scikit-learn model from the specified model URI, allowing you to access its attributes such as feature_importances. Doc: https://mlflow.org/docs/latest/python_api/mlflow.sklearn.html#mlflow.sklearn.load_model

Alishahab70Option: C
Feb 7, 2024

C is correct