Downloads · 30 days
0
xalpha27/ipl-match-prediction
ipl-match-prediction is a machine learning model from xalpha27. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains machine learning models for predicting IPL (Indian Premier League) cricket match outcomes using historical ball-by-ball data from 2008–2025.
Downloads · 30 days
0
Access
Public
Updated May 12, 2026
Repo size
6.3 MB
Likes
0
Public
Click a slice to open those files.
.pkl6.3 MB · 99%
From the Hugging Face model README
This repository contains machine learning models for predicting IPL (Indian Premier League) cricket match outcomes using historical ball-by-ball data from 2008–2025.
prasad-gade05/ipl-enriched-2008-2025 on Hugging Faceipl_model_v2/)Predicts the winner before the match starts using engineered features:
Models trained:
ipl_inmatch_model/)Predicts the win probability during the match at different stages:
Each stage uses the current match state:
| Model | Stage | Accuracy | AUC-ROC | Log Loss |
|---|---|---|---|---|
| XGBoost | 5 overs | 0.671 | 0.700 | 0.656 |
| XGBoost | 10 overs | 0.685 | 0.754 | 0.648 |
| XGBoost | 15 overs | 0.818 | 0.892 | 0.427 |
| XGBoost | 20 overs | 0.916 | 0.978 | 0.204 |
Baseline (always predict majority class): ~52.4%
xgboost_stage_5.pkl — In-match model at 5 oversxgboost_stage_10.pkl — In-match model at 10 oversxgboost_stage_15.pkl — In-match model at 15 oversxgboost_stage_20.pkl — In-match model at 20 oversteam_encoder.pkl — Label encoder for team namesstage_results.json — Evaluation metrics per stageimport joblib
import pandas as pd
# Load model for a specific stage
model = joblib.load("xgboost_stage_15.pkl")
encoder = joblib.load("team_encoder.pkl")
# Predict win probability for batting first team
features = pd.DataFrame({
'batting_first_enc': [encoder.transform(["Royal Challengers Bengaluru"])[0]],
'batting_second_enc': [encoder.transform(["Mumbai Indians"])[0]],
'toss_decision_bat': [1],
't1_runs': [120],
't1_balls': [90],
't1_wickets': [3],
't1_boundaries': [12],
't1_dots': [25],
't1_run_rate': [8.0],
't2_runs': [80],
't2_balls': [60],
't2_wickets': [2],
't2_boundaries': [8],
't2_dots': [20],
't2_run_rate': [8.0],
'target': [180],
'second_innings_active': [1],
'runs_remaining': [100],
'balls_remaining': [60],
'required_run_rate': [10.0],
'rr_diff': [0.0],
't2_wickets_remaining': [8],
})
prob = model.predict_proba(features)[0][1]
print(f"Batting first team win probability: {prob:.2%}")
Dataset used: CC0-1.0 (public domain)
<!-- ml-intern-provenance -->This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.