Sports outcome prediction
We may be able to do better by trying other features. We have a method for testing how accurate our models are. The cross_val_score
method allows us to try new features.
There are many possible features we could use, but we will try the following questions:
- Which team is considered better generally?
- Which team won their last encounter?
We will also try putting the raw teams into the algorithm to check whether the algorithm can learn a model that checks how different teams play against each other.
Putting it all together
For the first feature, we will create a feature that tells us if the home team is generally better than the visitors. To do this, we will load the standings (also called a ladder in some sports) from the NBA ...
Get Python: Real-World Data Science now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.