Get startedGet started for free

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.

This exercise is part of the course

Advanced Deep Learning with Keras

View Course

Exercise instructions

  • 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.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# 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 and Run Code