MulaiMulai sekarang secara gratis

Evaluate the model on a test set

After fitting the model, you can evaluate it on new data. You will give the model a new X matrix (also called test data), allow it to make predictions, and then compare to the known y variable (also called target data).

In this case, you'll use data from the post-season tournament to evaluate your model. The tournament games happen after the regular season games you used to train our model, and are therefore a good evaluation of how well your model performs out-of-sample.

The games_tourney_test DataFrame along with the fitted model object is available in your workspace.

Latihan ini adalah bagian dari kursus

Advanced Deep Learning with Keras

Lihat Kursus

Petunjuk latihan

  • Assign the test data (seed_diff column) to X_test.
  • Assign the target data (score_diff column) to y_test.
  • Evaluate the model on X_test and y_test.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Load the X variable from the test data
X_test = ____

# Load the y variable from the test data
y_test = ____

# Evaluate the model on the test data
print(model.____(____, ____, verbose=False))
Edit dan Jalankan Kode