A machine learning engineer has identified the best run from an MLflow Experiment. They have stored the run ID in the run_id variable and identified the logged model name as "model". They now want to register that model in the MLflow Model Registry with the name "best_model".
Which lines of code can they use to register the model associated with run_id to the MLflow Model Registry?
To compute the root mean-squared-error (RMSE) of a linear regression model using Spark ML, the RegressionEvaluator class is used. The RegressionEvaluator is specifically designed for regression tasks and can calculate various metrics, including RMSE, based on the columns containing predictions and actual values.
The correct code block to compute RMSE from the preds_df DataFrame is:
regression_evaluator = RegressionEvaluator( predictionCol='prediction', labelCol='actual', metricName='rmse' ) rmse = regression_evaluator.evaluate(preds_df)
This code creates an instance of RegressionEvaluator, specifying the prediction and label columns, as well as the metric to be computed ('rmse'). It then evaluates the predictions in preds_df and assigns the resulting RMSE value to the rmse variable.
Options A and B incorrectly use BinaryClassificationEvaluator, which is not suitable for regression tasks. Option D also incorrectly uses BinaryClassificationEvaluator.
Tommy
2 days agoSylvia
8 days agoCorrina
13 days agoReta
19 days agoKathryn
24 days agoShawna
1 month agoDianne
1 month agoGlen
1 month agoKris
1 month agoXuan
1 month agoMollie
6 months agoKristine
6 months agoVerlene
4 months agoAlpha
4 months agoJosue
5 months agoOretha
5 months agoEssie
6 months agoDan
5 months agoOmer
5 months agoKarina
5 months agoPhuong
6 months agoAmber
5 months agoMicah
6 months agoMabel
6 months agoErinn
6 months agoTrinidad
6 months agoKimbery
6 months agoKarma
6 months agoSerita
7 months agoValentin
7 months agoNovella
7 months ago