When XGBoost meets the sportsbook: a betting bot's honest math
A Python pipeline that trains models on 17 seasons of NBA data, then sizes your bets with the Kelly Criterion—because even gamblers deserve proper bankroll management.

What it does
This project predicts NBA moneyline winners and over/under totals by training XGBoost, neural network, and logistic regression models on team stats from 2007 through today. It ingests live odds from seven sportsbooks (or accepts manual input), computes expected value, and optionally spits out Kelly Criterion stake fractions so you don’t bet the rent on a hunch.
The interesting bit
The whole thing is deliberately unglamorous: SQLite databases, hard-coded NN paths, and a Flask app that looks like it was styled by a data scientist—which it was. That honesty is refreshing in a space usually coated in “AI trading guru” snake oil. The README even admits the neural net scripts are the “original versions” with fixed dataset paths.
Key highlights
- Three model families: XGBoost, TensorFlow neural nets, and logistic regression, each with separate moneyline and totals variants
- Live odds integration for FanDuel, DraftKings, BetMGM, and four others via SBR
- Kelly Criterion output for actual bankroll-aware sizing, not just raw probability
- Backfill commands for historical data and odds gaps
- Flask web UI for browsing predictions without touching the terminal
Caveats
- Neural network training scripts have hard-coded paths and datasets; the README suggests switching to “newer NN scripts” for configurability, but those aren’t documented
- No disclosed accuracy metrics, backtest results, or live performance tracking in the README
- The project description mentions GPT/LLM in its GitHub topics, but the README contains zero evidence of LLM usage
Verdict
Worth a look if you want a concrete, hackable baseline for sports prediction pipelines—especially the data merging and odds-comparison logic. Skip it if you’re seeking a turnkey profit machine or rigorous quantitative research; this is a learning project with sharp edges and no audited track record.
Frequently asked
- What is kyleskom/NBA-Machine-Learning-Sports-Betting?
- A Python pipeline that trains models on 17 seasons of NBA data, then sizes your bets with the Kelly Criterion—because even gamblers deserve proper bankroll management.
- Is NBA-Machine-Learning-Sports-Betting open source?
- Yes — kyleskom/NBA-Machine-Learning-Sports-Betting is an open-source project tracked on heatdrop.
- What language is NBA-Machine-Learning-Sports-Betting written in?
- kyleskom/NBA-Machine-Learning-Sports-Betting is primarily written in Python.
- How popular is NBA-Machine-Learning-Sports-Betting?
- kyleskom/NBA-Machine-Learning-Sports-Betting has 1.7k stars on GitHub.
- Where can I find NBA-Machine-Learning-Sports-Betting?
- kyleskom/NBA-Machine-Learning-Sports-Betting is on GitHub at https://github.com/kyleskom/NBA-Machine-Learning-Sports-Betting.