Skip to content

Cricket Score Prediction is a machine learning-based project that estimates the final score of a match using historical T20 data and real-time match conditions. It leverages Random Forest and XGBoost models, trained on 300+ matches, to provide accurate predictions

Notifications You must be signed in to change notification settings

MananPoojara/Score-Card-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sure! Here's a casual yet informative README for your Cricket Score Prediction project. Just replace [image] with your actual image.


🏏 Cricket Score Prediction

Cricket Score Prediction

This is a machine learning-powered Cricket Score Prediction system that analyzes past match data and predicts the final score based on various match conditions like batting team, bowling team, overs completed, wickets fallen, and recent performance.

It uses Random Forest & XGBoost models trained on 3000+ T20 matches to make accurate predictions.


🚀 Features

✅ Predicts final score based on current match conditions
✅ Uses Random Forest & XGBoost models
Streamlit-based web app for easy predictions
✅ Data extracted from YAML match files (ball-by-ball data)
✅ Feature Engineering: Considers factors like last 5 overs' performance, current run rate, and wickets left


📂 Project Structure

📦 Score-Card-Prediction
 ┣ 📂 data/                 # Contains match data (Not included in repo)
 ┣ 📜 dataset_level1.pkl    # Preprocessed dataset (ignored in GitHub)
 ┣ 📜 dataset_level2.pkl    # Final cleaned dataset (ignored in GitHub)
 ┣ 📜 rfc.pkl               # Random Forest Model (ignored in GitHub)
 ┣ 📜 xgboost.pkl           # XGBoost Model (ignored in GitHub)
 ┣ 📜 data_extraction.ipynb # Code for data extraction from YAML files
 ┣ 📜 feature_extraction.ipynb # Code for feature engineering
 ┣ 📜 app.py                # Streamlit web app
 ┣ 📜 requirements.txt      # Python dependencies
 ┗ 📜 README.md             # You’re reading this 😉

🛠 Setup & Run Locally

1️⃣ Clone the Repo

git clone https://github.com/your-username/Score-Card-Prediction.git
cd Score-Card-Prediction

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Run the Ipynb files So it create 3 pkl files for pipeline the data and model

streamlit run app.py

4️ Run the Streamlit App

streamlit run app.py

Now, open localhost:8501 in your browser and start predicting cricket scores! 🎉


📊 Model Performance

Model R² Score MAE RMSE
Random Forest 93.87% 5.56 8.28
XGBoost 98.0% 4.2 6.5

XGBoost gives better accuracy, but RFC was used for comparison.


📌 Future Improvements

🔹 Add pitch & weather conditions for better predictions
🔹 Use LGBM or Deep Learning (LSTM) for more accurate results
🔹 Integrate live match data API for real-time score updates


🙌 Contributions & Feedback

If you have suggestions, feel free to open an issue or drop a PR!
Let’s make this model even better. 🚀


About

Cricket Score Prediction is a machine learning-based project that estimates the final score of a match using historical T20 data and real-time match conditions. It leverages Random Forest and XGBoost models, trained on 300+ matches, to provide accurate predictions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published