Skip to content

Real-time cricket match prediction engine using ball-by-ball data from Cricsheet. Predicts Test match outcomes using XGBoost, Neural Networks, and Monte Carlo simulations. Built with Python and real event-level cricket analytics.

Notifications You must be signed in to change notification settings

PankajMahanto/Cricket-Wining-Prediction-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Creating a single all-in-one markdown file combining README, setup, and output sample

full_content = """

🏏 Real-Time Cricket Match Outcome Prediction Using Ball-by-Ball Analytics and Monte Carlo Simulation

This project predicts the outcome of a live Test match innings using ball-by-ball data and advanced machine learning models. It uses real data from Cricsheet (YAML format), and models the win probability using XGBoost, Neural Networks, and Monte Carlo simulations.


πŸ“‚ Project Structure


πŸš€ Features

  • Parses real match data from Cricsheet (YAML)
  • Builds a ball-by-ball simulation of Test innings
  • Extracts meaningful features: run rate, required RR, form, pressure
  • Trains:
    • XGBoost Model (classification)
    • Neural Network (Keras)
  • Runs Monte Carlo simulations to predict win probability
  • Visualizes match progression and win probability over time

πŸ” Technologies Used

  • Python
  • Pandas, NumPy
  • XGBoost
  • TensorFlow / Keras
  • Matplotlib / Seaborn
  • PyYAML

🧠 Feature Engineering

The following features are computed per ball:

  • cumulative_runs
  • cumulative_wickets
  • balls_faced
  • run_rate
  • required_runs / required_rr
  • batsman_form (simulated)
  • pitch_flatness (simulated)
  • crowd_pressure (simulated)

πŸ“ˆ Model Accuracy

Model Accuracy
XGBoost ~88%
Neural Network ~89%

Monte Carlo simulation yields win probabilities with high confidence under realistic match constraints.


πŸ“Š Sample Output


πŸ—οΈ How to Run

1. Install Dependencies

pip install xgboost tensorflow pandas numpy matplotlib seaborn pyyaml scikit-learn

About

Real-time cricket match prediction engine using ball-by-ball data from Cricsheet. Predicts Test match outcomes using XGBoost, Neural Networks, and Monte Carlo simulations. Built with Python and real event-level cricket analytics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published