Extracting parameters
You've now tested 192 different models on the msd dataset, and you found the best ROEM and its respective model (model 38).
You now need to extract the hyperparameters. The model_list you created previously is provided here. It contains all 192 models you generated. Use the instructions below to extract the hyperparameters.
Deze oefening maakt deel uit van de cursus
Building Recommendation Engines with PySpark
Oefeninstructies
- Use list slicing to extract model 38 from the model list. Call this model
best_model. - Use the
.get____()method to extract the following hyperparameter values:RankMaxIterRegParamAlpha
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Extract the best_model
best_model = ____[____]
# Extract the Rank
print ("Rank: ", best_model.get___())
# Extract the MaxIter value
print ("MaxIter: ", ____.get____())
# Extract the RegParam value
print ("RegParam: ", best_model.____())
# Extract the Alpha value
print ("Alpha: ", ____.____())