将模型拟合到常规赛训练数据
既然您已经定义了完整的球队实力模型,就可以把它拟合到篮球数据上了!由于模型现在有两个输入,您需要将输入数据以列表的形式传入。
本练习是课程的一部分
使用 Keras 的高级深度学习
练习说明
- 分别将
games_season中的'team_1'和'team_2'列赋给input_1和input_2。 - 使用
games_season中的'score_diff'列作为目标值。 - 以 1 个 epoch、批大小 2048,以及 10% 验证集划分来拟合模型。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# 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)