ComeçarComece de graça

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.

Este exercício faz parte do curso

Building Recommendation Engines with PySpark

Ver curso

Instruções do exercício

  • 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:
    • Rank
    • MaxIter
    • RegParam
    • Alpha

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# 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: ", ____.____())
Editar e executar o código