Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Machine Learning Professional All Questions

View all questions & answers for the Certified Machine Learning Professional exam

Exam Certified Machine Learning Professional topic 1 question 20 discussion

Actual exam question from Databricks's Certified Machine Learning Professional
Question #: 20
Topic #: 1
[All Certified Machine Learning Professional Questions]

A data scientist has developed a model model and computed the RMSE of the model on the test set. They have assigned this value to the variable rmse. They now want to manually store the RMSE value with the MLflow run.
They write the following incomplete code block:

Which of the following lines of code can be used to fill in the blank so the code block can successfully complete the task?

  • A. log_artifact
  • B. log_model
  • C. log_metric
  • D. log_param
  • E. There is no way to store values like this.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hugodscarvalho
10 months ago
Selected Answer: C
RMSE is a metric so we should use the inbuilt mlflow.log_metric(). Doc: https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.log_metric
upvoted 2 times
...
random_data_guy
11 months ago
Selected Answer: C
https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.log_metric import mlflow # Log a metric with mlflow.start_run(): mlflow.log_metric("mse", 2500.00)
upvoted 2 times
...
BokNinja
11 months, 1 week ago
C. import numpy as np from sklearn.metrics import mean_squared_error import mlflow # Assuming 'actual' is your array of actual values and 'pred' is your array of predicted values actual = ... pred = ... # Calculate RMSE rmse = np.sqrt(mean_squared_error(actual, pred)) # Log RMSE metric in MLflow mlflow.log_metric("rmse", rmse)
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...