Fit the model to the tournament basketball data
Now that the model is compiled, you are ready to fit it to some data!
In this exercise, you'll use a dataset of scores from US College Basketball tournament games. Each row of the dataset has the team ids: team_1 and team_2, as integers. It also has the seed difference between the teams (seeds are assigned by the tournament committee and represent a ranking of how strong the teams are) and the score difference of the game (e.g. if team_1 wins by 5 points, the score difference is 5).
To fit the model, you provide a matrix of X variables (in this case one column: the seed difference) and a matrix of Y variables (in this case one column: the score difference).
The games_tourney DataFrame along with the compiled model object is available in your workspace.
This exercise is part of the course
Advanced Deep Learning with Keras
Exercise instructions
- Fit the model with
seed_diffas the input variable andscore_diffas the output variable. - Use 1 epoch, a batch size of 128, and a 10% validation split.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Now fit the model
____(games_tourney_train[____], games_tourney_train[____],
epochs=____,
batch_size=____,
validation_split=____,
verbose=True)