NBA player-stat predictor
One LightGBM regressor per target (points, rebounds, assists) that predicts a player's box-score line for a game from that player's history before the game. Personal, non-commercial portfolio project.
Dataset
- Repo:
cbratkovics/nba-game-logs, versionhf:b20b5601de213fa8e704ebffaafd18f182ea68c3 - Rows are per (player, game); features use only games strictly before the target game.
- Training rows are limited to games where the player logged at least 10.0 minutes.
Split
| Seasons | Dates | Rows | |
|---|---|---|---|
| Train | 2021-22, 2022-23, 2023-24, 2024-25 | 2021-10-19 to 2025-04-13 | 88257 |
| Holdout | 2025-26 | 2025-10-21 to 2026-04-12 | 22630 |
The holdout season is never used for fitting or for choosing settings.
Metrics on the holdout season
baseline_last10 is the player's mean over the previous 10 games;
baseline_season is the player's season-to-date mean. All three predictors are
scored on the same rows (those where both baselines are defined).
Holdout season: 2025-26 (2025-10-21 to 2026-04-12)
| Target | Predictor | MAE | RMSE | R² | n |
|---|---|---|---|---|---|
| pts | model | 4.764 | 6.160 | 0.457 | 22244 |
| pts | baseline_last10 | 4.908 | 6.393 | 0.415 | 22244 |
| pts | baseline_season | 4.946 | 6.467 | 0.401 | 22244 |
| reb | model | 1.942 | 2.527 | 0.402 | 22244 |
| reb | baseline_last10 | 2.009 | 2.644 | 0.346 | 22244 |
| reb | baseline_season | 2.008 | 2.659 | 0.338 | 22244 |
| ast | model | 1.431 | 1.909 | 0.461 | 22244 |
| ast | baseline_last10 | 1.460 | 1.967 | 0.427 | 22244 |
| ast | baseline_season | 1.456 | 1.973 | 0.424 | 22244 |
Features
pts_mean_last5pts_mean_last10pts_mean_last20reb_mean_last5reb_mean_last10reb_mean_last20ast_mean_last5ast_mean_last10ast_mean_last20minutes_mean_last5minutes_mean_last10minutes_mean_last20pts_mean_seasonreb_mean_seasonast_mean_seasonminutes_mean_seasongames_played_seasondays_restback_to_backhomepts_mean_vs_oppreb_mean_vs_oppast_mean_vs_opp
Files
lgbm_pts.txt(LightGBM text model forpts)lgbm_reb.txt(LightGBM text model forreb)lgbm_ast.txt(LightGBM text model forast)metrics.json(the report these numbers come from)
Known limitations
- Predicts only for players who play; it does not predict minutes or DNPs, and it is only evaluated on games with at least 10.0 minutes played.
- No injury, lineup, betting-line, or opponent-strength inputs.
- Regular-season games only.
- Game-to-game variance in box-score stats is high; compare against the baselines above rather than reading the absolute error alone.
Data note
Game logs are derived from NBA.com box scores (Kaggle CC0 backfill; nba_api
for updates). NBA data is used here for non-commercial personal study only.
Trained at git commit 50a3b2e33b443d1db19274cea27467072ebfb3f8 on 2026-09-12T02:00:06+00:00.