Session Ready
Exercise

Make an input layer for home vs. away

Now you will make an improvement to the model you used in the previous chapter for regular season games. You know there is a well-documented home-team advantage in basketball, so you will add a new input to your model to capture this effect.

This model will have three inputs: team_id_1, team_id_2, and home. The team IDs will be integers that you look up in your team strength model from the previous chapter, and home will be a binary variable, 1 if team_1 is playing at home, 0 if they are not.

The team_strength_model you used in the previous chapter has been loaded into your workspace. After applying it to each input, use a Concatenate layer to join the two team strengths and with the home vs away variable, and pass the result to a Dense layer.

Instructions
100 XP
  • Create three inputs layers of shape 1, one each for team 1, team 2, and home vs away.
  • Lookup the team inputs in team_strength_model().
  • Concatenate the team strengths with the home input and pass to a Dense layer.