Back to Projects
MLOps / Data EngineeringCompleted

T20 Match Predictor

End-to-End MLOps Pipeline for Live Sports Analytics

The Problem

Cricket match predictions rely on highly volatile and dynamic features (weather, toss, stadium history). Static models decay rapidly as sports meta shifts.

Why it matters

Sports analytics requires continuous learning. A static model trained on 2018 data is useless for the 2026 World Cup. Automated pipelines are critical.

Who is affected

Sports analysts, broadcasting statisticians, and fantasy leagues.

Architecture & System Design

Backend Processing

Python data engineering scripts (ETL) deployed inside Docker containers.

ML Pipeline

XGBoost classifier managed by MLflow for strict hyperparameter tracking and registry management. Automates model versioning.

Architectural Reasoning

Chose XGBoost/Random Forest ensembles because tabular sports data with heavy categorical features (stadiums, teams) strongly benefits from tree-based splits over Deep Learning.

Alternatives Considered

A deep Neural Network was considered but discarded due to lack of interpretability and massive overfitting on historical noise.

ML & Technical Deep Dive

Model Selection & Training
Core Architecture

XGBoost Classifier ensemble

Training Methodology

K-Fold Time-Series Cross-Validation ensures the model is evaluated on future chronological matches, perfectly simulating real-world predictive validity.

Dataset

10+ years of ball-by-ball T20 data aggregated and cleaned.

Preprocessing Pipeline
  • .01Feature engineering: rolling averages of team run-rates
  • .02Encoding categorical features (venues, toss winners)
  • .03Target encoding for match outcome
Evaluation Metrics

72%

Validation Accuracy

Continuous

Model Registry Updates
Technical Challenges
Problem: Data Leakage across Time
Solution: Enforced strict chronological splits instead of random train-test splitting to ensure future data never bled into training sets.
Problem: Model Decay over Seasons
Solution: Implemented automated cron-job retraining pipelines that fetch latest match CSVs, retrain, and push the new version to MLflow.

Core Features

Automated ETL

Scripts that ingest, clean, and map raw ball-by-ball metrics into aggregate team features.

MLflow Integration

Every training run automatically registers parameters, loss curves, and artifact models locally.

Win Probability Estimation

Doesn't just predict a binary winner, but outputs calibrated probability confidences.

Results & Impact

Moved from ad-hoc manual Jupyter Notebook predictions to a fully automated MLOps CI/CD pipeline.

The architecture mirrors enterprise ML implementations where data drift is aggressively managed via infrastructure.

72% baseline prediction accuracy

Zero-touch retraining architecture

Takeaways & Learnings

What I Learned

Deepened understanding of MLOps. A model is only 10% of an ML system; the robust data engineering and versioning pipelines make up the other 90%.

Trade-Offs Made

Sacrificed extreme model complexity for operational reliability and hyper-fast execution speeds during live matches.

Future Improvements

Deploy the inference API securely via FastAPI on AWS Lambda, rather than local Dockerized endpoints.

Tech Stack Foundation

ML / AI
  • XGBoost
  • scikit-learn
Backend
  • Python
  • Pandas
  • NumPy
MLOps
  • MLflow
  • Docker
Tools
  • Git
  • Cron

Interested in this architecture?

Let's talk about how I can build something similar for your team.