{% extends "base.html" %} {% block title %}Model Info — Cricket AI{% endblock %} {% block content %}
DotBall.pkl
XGBClassifier · Binary · 18 features

Predicts whether the next delivery will be a dot ball (no run scored). Trained on IPL ball-by-ball data with bowler economy, batter strike rate, phase, and momentum features.

Accuracy88.4%
Precision87.1%
Recall84.6%
F1 Score85.8%
BoundaryModel.pkl
XGBClassifier · Binary · 18 features

Predicts the probability of a boundary (4 or 6) being scored. Uses striker strike rate, bowler economy, pitch phase, and recent scoring rate as key features.

Accuracy83.2%
Precision80.7%
Recall82.3%
F1 Score81.5%
RunPrediction.pkl
XGBClassifier · Multi-class (0–5) · 18 features

Multi-class classifier outputting probability distribution over outcomes 0–5 runs per ball. Used to compute expected runs and full run distribution visualisation.

Accuracy79.6%
Macro F176.2%
Log Loss0.61
Classes0, 1, 2, 3, 4, 5
IPLchasingTeamWin.pkl
XGBClassifier · Binary · 8 features

Predicts win probability for the chasing team in the 2nd innings. Uses current score, wickets, balls remaining, run rate, and team/venue encodings.

AUC-ROC0.918
Accuracy85.3%
Brier Score0.148
Log Loss0.191

Input Features

Ball Models (18 features)
striker_enc
bowler_enc
batting_team_enc
bowling_team_enc
venue_enc
over
ball_in_over
phase
current_score
wickets_fallen
run_rate
prev_runs
prev_wicket
last_6_runs
last_12_runs
last_6_wickets
batter_sr
bowler_eco
Win Model (8 features)
batting_team
bowling_team
venue
innings
current_score
wickets_fallen
balls_remaining
run_rate
Phase Encoding
0Powerplay — Overs 1–6
1Middle Overs — 7–15
2Death Overs — 16–20

API Reference

POST /api/predict — Request
{
  "batting_team"  : "Mumbai Indians",
  "bowling_team"  : "Chennai Super Kings",
  "venue"         : "Wankhede Stadium",
  "innings"       : 1,
  "over"          : 14,
  "ball_in_over"  : 3,
  "current_score" : 110,
  "wickets_fallen": 2,
  "batter_sr"     : 148,
  "bowler_eco"    : 7.4,
  "last_6_runs"   : 11,
  "last_12_runs"  : 19
}
POST /api/predict — Response
{
  "dot_ball_prob"   : 24.3,   // % probability of dot ball
  "boundary_prob"   : 38.7,   // % probability of 4 or 6
  "expected_runs"   : 2.41,   // weighted mean runs
  "run_distribution": [0.24, 0.22, 0.08, 0.06, 0.28, 0.12],
  "win_probability" : null,   // populated in innings 2
  "phase"           : "Middle Overs (Ov 7-15)",
  "run_rate"        : 7.86
}

Label Encodings

IPL Teams
0Chennai Super Kings
1Delhi Capitals
2Gujarat Titans
3Kolkata Knight Riders
4Lucknow Super Giants
5Mumbai Indians
6Punjab Kings
7Rajasthan Royals
8Royal Challengers Bangalore
9Sunrisers Hyderabad
Venues
0Arun Jaitley Stadium
1Brabourne Stadium
2DY Patil Stadium
3Eden Gardens
4Feroz Shah Kotla
5MA Chidambaram Stadium
6MCA Stadium
7Maharashtra CAS
8Narendra Modi Stadium
9Punjab CAS
10Rajiv Gandhi IS
11Sawai Mansingh Stadium
12Wankhede Stadium
{% endblock %}