This is one of my favorite end-to-end machine learning projects where I worked on predicting the first-innings score in an IPL match. I personally handled everything – from data collection and preprocessing, to model training, evaluation, and finally deploying the solution as a Flask web application.
🔗 Demo Video: Watch here
📷 Web App Screenshot:
📓 Jupyter Notebook: View Here
My goal was to build a model that predicts the final first-innings score of an IPL match using real-time match data such as:
- Batting and bowling teams
- Current runs, wickets, overs
- Runs and wickets in the last 5 overs
This project follows a complete ML pipeline:
-
Data Collection:
- Collected ball-by-ball IPL data (2008–2017) from Kaggle.
-
Data Preprocessing:
- Cleaned dataset by removing unnecessary columns like
mid,venue,batsman. - Filtered consistent teams and dropped overs less than 5 for meaningful stats.
- Performed categorical encoding using
get_dummies(). - Split data into training (till 2016) and testing (2017) sets.
- Cleaned dataset by removing unnecessary columns like
-
Model Training:
- Trained a Linear Regression model using Scikit-learn.
- Achieved an R² score of ~82%, which accurately captures scoring trends.
-
Model Saving:
- Saved the trained model with Python’s
pickleaslr-model.pkl.
- Saved the trained model with Python’s
-
Flask Deployment:
- Developed a user-friendly Flask web app with HTML frontend.
- Users can select teams, overs, runs, wickets, etc., and instantly get predicted scores.
- Python, Pandas, NumPy – Data processing
- Matplotlib – Visualization
- Scikit-learn – Machine Learning (Linear Regression)
- Flask – Web deployment
- HTML/CSS – Frontend UI
Example Input:
- Batting team: Mumbai Indians
- Bowling team: CSK
- Overs completed: 12.3
- Runs: 105
- Wickets: 3
- Runs in last 5 overs: 45
- Wickets in last 5 overs: 2
Predicted Final Score: 178 Runs
| Metric | Result |
|---|---|
| Algorithm | Linear Regression |
| Train/Test Split | 80/20 |
| Evaluation Metric | R² Score |
| Accuracy | ~82% |
I designed, implemented, and deployed the entire project myself — from data engineering, feature engineering, and model training, to building the Flask web app and deploying it locally for demonstration.