Get startedGet started for free

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

View Course

Exercise instructions

  • Assign the 'team_1' and 'team_2' columns from games_season to input_1 and input_2, respectively.
  • Use 'score_diff' column from games_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)
Edit and Run Code