НачатьНачать бесплатно

Evaluate the model

Remember the test data that you set aside waaaaaay back in chapter 3? It's finally time to test your model on it! You can use the same evaluator you made to fit the model.

Это упражнение является частью курса

Foundations of PySpark

Посмотреть курс

Инструкции к упражнению

  • Use your model to generate predictions by applying best_lr.transform() to the test data. Save this as test_results.
  • Call evaluator.evaluate() on test_results to compute the AUC. Print the output.

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Use the model to predict the test set
test_results = best_lr.____(____)

# Evaluate the predictions
print(evaluator.evaluate(____))
Редактировать и запускать код