IPL Prediction Engine (Hybrid XGBoost + LSTM)
π Live Demo
Hugging Face Space: zeroday01/ipl_prediction_engine
A high-performance machine learning engine designed to predict IPL match outcomes and ball-by-ball win probabilities using a hybrid ensemble architecture.
π Key Features
- Hybrid Architecture: Combines XGBoost (for static match context) and LSTM (for temporal momentum).
- Enriched Context: Real-time integration of historical Open-Meteo Weather Data (dew, temperature, humidity).
- Dynamic Form Tracking: Rolling ELO ratings for teams and players calculated from 2008 to 2024.
- Memory Efficient: Optimized training pipeline using
IterableDatasetto handle 1000+ match files on low-RAM hardware. - Real-Time Ready: Built-in support for Redis-based live match streaming.
π Project Structure
backend/ml_engine/hybrid_model.py: Core model architecture and normalization.backend/ml_engine/train_efficient.py: Memory-efficient training pipeline.backend/data_pipeline/fetch_weather_data.py: Historical weather data harvester.backend/data_pipeline/feature_engineer_elo.py: ELO and form calculation engine.
π¦ Installation
- Clone the repository.
- Create a virtual environment:
python -m venv .venv source .venv/bin/activate - Install dependencies:
pip install -r requirements.txt
π Usage
1. Enrich the Data
First, generate the weather and ELO datasets:
python backend/data_pipeline/fetch_weather_data.py
python backend/data_pipeline/feature_engineer_elo.py
2. Train the Model
python backend/ml_engine/train_efficient.py
3. Run Inference Test
python backend/ml_engine/test_inference.py
βοΈ License
MIT
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support