Get RMSE
Now that you know how to build a model and generate predictions, and have an evaluator to tell us how well it predicts ratings, we can calculate the RMSE to see how well an ALS model performed. We'll use the evaluator that we built in the previous exercise to calculate and print the rmse.
Diese Übung ist Teil des Kurses
<Kurs>Building Recommendation Engines with PySpark</Kurs>Übungsanweisungen
- Call the
.evaluate()method on ourevaluatorto calculate our RMSE on thetest_predictionsdataframe. Call the resultRMSE. - Print the
RMSE
Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Evaluate the "test_predictions" dataframe
RMSE = evaluator.____(____)
# Print the RMSE
print (____)