MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Advanced Deep Learning with Keras

Lihat Kursus

Petunjuk latihan

  • Fit the model with seed_diff as the input variable and score_diff as the output variable.
  • Use 1 epoch, a batch size of 128, and a 10% validation split.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Now fit the model
____(games_tourney_train[____], games_tourney_train[____],
          epochs=____,
          batch_size=____,
          validation_split=____,
          verbose=True)
Edit dan Jalankan Kode