Work Case study
Dota 2 Match Predictions
A service that follows the pro schedule on its own, predicts every match, updates live from the draft, grades itself when the series ends, and prices bookmaker-style markets so any edge is visible.
How it fits together
01
The problem
Professional Dota 2 has a dense schedule, constant roster changes and a new patch every few weeks. I wanted a probability for every match before it starts, a second one once the draft is locked, and an honest record of how often the model is right.
02
What needed to change
A service that follows the pro schedule on its own, predicts every match, updates live from the draft, grades itself when the series ends, and prices bookmaker-style markets so any edge is visible.
03
Architecture
A Python service pulls the schedule from PandaScore every ten minutes and the live feed from OpenDota every minute, keeps an in-memory feature state of team and player Elo, lineups and drafts, and serves predictions from two LightGBM models trained on about 105,000 pro games. A FastAPI dashboard shows upcoming and live matches, markets, tournaments and the track record. Everything runs in one process on Dokploy, with Postgres or SQLite underneath.
04
What I built
- Leakage-free features computed strictly as-of game start by replaying history, with one state object serving training, the CLI and the live service
- Pre-draft and post-draft LightGBM models with a chronological split, mirror augmentation, early stopping and isotonic calibration
- Series markets for Bo1 to Bo5: winner, correct score, total maps, map handicap and map one plus match, with fair odds beside pasted bookmaker odds
- One prediction locked per match before it starts, graded on accuracy, Brier score, log loss and a calibration chart
- Team mapping that links schedule names to match history only on real evidence, and corrects itself from the players on the field
05
Stack
- Python
- LightGBM
- scikit-learn
- FastAPI
- Polars
- SQLAlchemy
- PostgreSQL
- OpenDota API
- PandaScore API
- Docker
- Dokploy
06
Result
On a walk-forward test over a hundred thousand games the model beats an Elo baseline on every metric, and on the half of matches it is most confident about it is right about seven times in ten. The dashboard keeps that score in public.
07
What I learned
The model was a week. Keeping the data honest was the project: as-of features, one locked prediction per match, and grading the service cannot skip.