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