Fit the model to the regular season training data
Now that you've defined a complete team strength model, you can fit it to the basketball data! Since your model has two inputs now, you need to pass the input data as a list.
This exercise is part of the course
Advanced Deep Learning with Keras
Exercise instructions
- Assign the
'team_1'
and'team_2'
columns fromgames_season
toinput_1
andinput_2
, respectively. - Use
'score_diff'
column fromgames_season
as the target. - Fit the model using 1 epoch, a batch size of 2048, and a 10% validation split.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Get the team_1 column from the regular season data
input_1 = games_season[___]
# Get the team_2 column from the regular season data
input_2 = games_season[___]
# Fit the model to input 1 and 2, using score diff as a target
____(____,
____,
epochs=____,
batch_size=____,
validation_split=____,
verbose=True)