Downloads · 30 days
0
Nevoreuven/tennis-betting-odds-model
tennis-betting-odds-model is a machine learning model from Nevoreuven. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Video: https://docs.google.com/videos/d/1i5HiqWHHtO9vakVhAM8epUmP1hSEDB4ifv0OafGs/edit?scene=id.pscene=id.p
Downloads · 30 days
0
Access
Public
Updated Dec 8, 2025
Repo size
1.9 MB
Likes
0
Public
Click a slice to open those files.
.ipynb2.1 MB · 53%
From the Hugging Face model README
This project explores whether machine learning models can predict betting odds and betting risk levels from historical WTA tennis statistics.
Using a large-scale dataset (2007–2023), we built regression and classification models to understand how ranking, performance gaps, match context, and engineered features shape betting market behavior.
The final goal:
Can historical match statistics help identify betting patterns and support decision-making in real time?
Dataset used: WTA Tennis 2007–2023 Daily Update
Size: ~50,000 matches
Features extracted:
Rank_1, Rank_2)Pts_1, Pts_2)Odd_1, Odd_2)Surface, Round)Engineered features:
| Feature | Description |
|---|---|
Rank_Diff | Rank_1 − Rank_2 (competitive gap) |
Pts_Diff | Pts_1 − Pts_2 (performance gap) |
Favorite_Flag | 1 if Odd_1 < Odd_2 |
Cluster_Label | K-Means cluster based on ranks and points |
These features proved essential for improving model performance.
We started by exploring the distribution of betting odds and competitive gaps.
Odd_1)
This plot shows that:
Rank_Diff)
Interpretation:

This scatter plot shows:
Rank_Diff and Odd_1.Rank_Diff), Odd_1 tends to be lower.Rank_Diff), Odd_1 increases.This confirms that ranking gaps are a key driver of betting odds.

We see that:
We engineered several features to improve predictive power:
Capture performance gaps between players — strong predictors of market expectations.
Binary indicator:
1 → Player 1 is the pre-match favorite (Odd_1 < Odd_2)0 → Player 1 is the underdogK-Means clustering on:
Rank_1, Rank_2, Pts_1, Pts_2This groups matches into tiers (balanced, uneven, elite matchups) and adds a latent “match type” signal to the model.
All engineered features were inspected visually and statistically before modeling.
Odd_1)We trained three regression models to predict Odd_1:
Evaluation metrics:

We see that:
Rank_Diff and Pts_Diff are among the most important predictors.Cluster_Label) and favorite information (Favorite_Flag) also contribute significantly.Why Gradient Boosting Won:
The final regression model is saved as:
winning_regression_model.pkl
To create a classification problem, we transformed Odd_1 into three balanced classes using quantiles:
This created a well-balanced classification setup where each class has a similar number of samples.
We also discussed:
Odd_Class (Risk Level)We trained three classification models:
Main evaluation metric:

The confusion matrix shows that:
High_Odds class, which is crucial for not missing risky underdog situations.
Key insights:
Rank_Diff, Pts_Diff, Favorite_Flag, Cluster_Label) are highly influential.Surface, Round) also plays a role in predicting risk levels.Why Random Forest Won:
The final classification model is saved as:
winning_classification_model.pkl
Both models were exported as .pkl pipelines:
winning_regression_model.pklwinning_classification_model.pklThey can be:
Yes.
The regression model successfully learned the structure of betting markets using ranking, point differences, and match-level context.
Yes.
The Random Forest classifier reliably distinguishes between Low, Medium, and High odds categories.
Partially.
Still, the models provide a solid foundation for pre-match risk assessment.
Copy_of_Assignment_2_Classification,_Regression,_Clustering,_Evaluation.ipynb
1_distribution_odd1.png
2_distribution_rank_diff.png
3_rank_diff_vs_odd1.png
4_odd1_by_surface.png
5_confusion_matrix_rf.png
6_feature_importance_regression_gb.png
7_feature_importance_classification_rf.png
winning_regression_model.pkl (optional alias: winning_model.pkl)
winning_classification_model.pkl
wta (1).csv
README.md