開始使用免費開始

在錦標賽測試資料上評估模型

你在前一個練習中用例行賽資料擬合好的模型(model)以及錦標賽資料集(games_tourney)都已在你的工作環境中。

在這個練習中,你會在這個新資料集上評估模型。這個評估能告訴你:以例行賽資料訓練出的模型,可以多準確地預測錦標賽的比賽結果。這很有意思,因為在錦標賽中,很多隊伍彼此對戰時,例行賽並沒有交手過,所以這是檢查模型沒有過度擬合的很好方法。

本練習屬於課程

使用 Keras 的進階深度學習

檢視課程

練習說明

  • 分別將 games_tourney 中的 'team_1''team_2' 欄位指定給 input_1input_2
  • 評估這個模型。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Get team_1 from the tournament data
input_1 = games_tourney[____]

# Get team_2 from the tournament data
input_2 = games_tourney[____]

# Evaluate the model using these inputs
print(____([____, ____], games_tourney[____], verbose=False))
編輯並執行程式碼