Sports Analytics · AI · Machine Learning
UFC Fight Predictor
A machine learning system that predicts who wins a UFC fight, how and in which round. Trained on 9,000 fights, tested once on 932 fights it had never seen, and deployed as a Streamlit app that scores a full card and keeps a paper-betting ledger.

What it does
- Predicts the winner, the method (knockout, submission or decision) and the round for every fight on a card
- Winner model: the average of a logistic regression and a LightGBM model, built on top of the opening odds and each fighter's UFC history
- Method and round model walks each fighter through the rounds: knockout, submission, or the fight continues to a decision
- Walk-forward validation over 2019-2024, settings frozen, then one single test on 932 unseen fights from 2025-26
- Edged the opening odds on accuracy and log loss with positive closing-line value; the method and round model passed all three pre-set checks against base rates
- Paper-betting ledger that logs picks at the price available, settles results and tracks closing-line value and running units
- Fair-price calculator for any combination of winner, method and round
- Feature pipeline over 9,000 UFC fights: Elo ratings, age, recent form, striking and grappling rates, layoffs and experience
- Placebo tests and leak checks to confirm the signal is real
Built with
- Python
- pandas
- NumPy
- scikit-learn
- LightGBM
- Streamlit
- pytest
- Matplotlib
- Streamlit Community Cloud
How it fits together
The project
Why
Bookmakers' odds are the best public forecast of a fight. This project asks whether a model that starts from those odds and adds each fighter's history can improve on them, and whether any improvement is real or just luck. The whole build was designed around answering that honestly.
How it was built
- Data. Around 9,000 UFC fights, cleaned into fighter-by-fight histories. Every feature is computed only from what was known before the fight: Elo rating, age, recent form, striking and grappling rates, layoffs and experience, with older fights down-weighted.
- Two models, averaged. A logistic regression and a LightGBM gradient-boosting model, each placed on top of the opening odds. Hundreds of settings were compared with walk-forward validation: every year from 2019 to 2024 was predicted by models trained only on earlier years.
- One test, run once. The pass rules were written down and the settings frozen before any 2025-26 fight was read. The test was then run a single time on 932 fights with usable odds.
- Sanity checks. Shuffled-feature placebos, a leak check against the closing line, and checks that the betting rule survives worse prices.
What it found
| Accuracy | Log loss (lower is better) | |
|---|---|---|
| Coin flip | 50.0% | 0.693 |
| Opening odds | 66.6% | 0.606 |
| This model | 67.3% | 0.600 |
| Closing odds | 69.7% | 0.584 |
- The winner model was slightly better than the opening odds, but by too little to rule out luck. It met 1 of the 3 conditions set in advance.
- Paper bets at opening prices returned +5.2% on 322 bets (95% range -3.6% to +13.7%), with positive closing-line value. The same picks lost 10% at closing prices, so any edge depends on getting early prices. That is why the app only bets on paper.
- The method and round model beat base rates on all 3 of its conditions: it picked the right method 53.9% of the time against 48.9% for base rates, and the exact result (fighter, method and round) was in its top three 63.8% of the time against 61.4%.
The app
The Streamlit app loads a full event card, scores every fight with the frozen models, and shows win probabilities, the best-value side and its edge, the chance of a knockout, submission or decision, and the most likely exact result. A builder gives the probability and fair price for any winner, method and round combination. A ledger logs paper bets at the price available, settles results and tracks closing-line value and running units.
Next
A judge-scoring model that predicts each round's 10-9 from the fight statistics, and a robbery meter for controversial decisions, are built and being added to the app.