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.
Virgina
4 months agoElly
5 months agoIsaac
5 months agoTommy
5 months agoSylvia
5 months agoCorrina
5 months agoReta
6 months agoKathryn
6 months agoShawna
6 months agoDianne
6 months agoGlen
6 months agoKris
6 months agoXuan
6 months agoMollie
11 months agoKristine
11 months agoVerlene
9 months agoAlpha
9 months agoJosue
10 months agoOretha
10 months agoEssie
11 months agoDan
10 months agoOmer
10 months agoKarina
10 months agoPhuong
11 months agoAmber
10 months agoMicah
11 months agoMabel
11 months agoErinn
12 months agoTrinidad
11 months agoKimbery
11 months agoKarma
11 months agoSerita
12 months agoValentin
12 months agoNovella
1 year ago