Reference
The equations in the model
Every feature for a game is computed from information available before tip-off. The target is , equal to 1 when the home team wins and 0 otherwise. Pregame does not convert these probabilities into betting value.
Possessions
A game has one possession count, the average of the Basketball-Reference estimate for each team.
Season to date
Counting stats are summed over the team’s completed games in the same season, excluding the game being predicted. An unplayed game adds nothing. Games played increments only when the game has a score. leaves a rate missing rather than treating it as zero.
is points scored, opponent points, possessions, and the recorded player-minutes. Dividing by 5 turns player-minutes into team-minutes. Ratings and pace are computed from the sums, so a game with more possessions weighs more than one with fewer.
Shooting and possession rates are stored as fractions. A 55% effective field-goal rate is 0.55. A zero denominator is missing.
| Effective field-goal percentage | |
| Turnover percentage | |
| Offensive rebound percentage | |
| Free-throw rate | |
| Opponent effective field-goal percentage | |
| Opponent turnover percentage | |
| Defensive rebound percentage |
Last 10 games
Points, opponent points and possessions are summed over the previous completed games this season, at most 10, with a shorter window early in the season. The current game is excluded, and the result is carried onto later unplayed rows.
Prior season and the blend
Last season’s net rating is the season total, then shrunk toward a league-average net rating of zero by 0.6. It is worth 10 games in the blend. A missing prior, or a missing current net rating, is treated as zero inside the blend only. The stored previous-season rating itself stays missing.
A team at last season and through five games this season blends to . The weights are fixed. They are not learned.
Rest and schedule density
Rest is the whole days between this scheduled date and the team’s previous scheduled date, minus one, capped at 7. The first game on record, and the first game of a new season, is set to 7.
Games in the last seven days counts scheduled dates for that team in the half-open window . A game exactly seven days earlier is included. The current date is not. The count is schedule density, not a filter for games that were actually completed.
Elo
Elo is its own probability. It is not a coefficient inside logistic regression or boosting. A team starts at 1,500. Between seasons the rating is pulled toward 1,505:
Home court is 55 points, and 0 at a neutral site. The pregame home-win probability is recorded before the result moves either rating.
After a completed game, and is the winner’s pregame advantage, including home court. if the home team wins.
is without the 55-point home advantage. already includes it. is a separate input, 1 at a home site and 0 at a neutral site.
What the classifiers see
There are 31 inputs: 11 side features and 20 home-minus-away differences, .
Side features
- home_court
- home_back_to_back
- away_back_to_back
- home_games_last_7d
- away_games_last_7d
- home_games_played
- away_games_played
- home_players_out
- away_players_out
- home_key_players_out
- away_key_players_out
Differences
- diff_win_pct
- diff_off_rtg
- diff_def_rtg
- diff_net_rtg
- diff_pace
- diff_efg_pct
- diff_tov_pct
- diff_oreb_pct
- diff_ft_rate
- diff_opp_efg_pct
- diff_opp_tov_pct
- diff_dreb_pct
- diff_net_rtg_l10
- diff_net_rtg_blend
- diff_rest_days
- diff_missing_minutes
- diff_missing_impact
- diff_missing_impact_delta
- diff_available_impact
- diff_elo
Availability
For a completed game, a player on the roster is out if he logged no minutes. The roster is everyone who played for the team in its previous 10 completed games this season, excluding a player whose last appearance before this game was for another team.
Expected minutes are the mean minutes over the player’s last 10 appearances before the game. Impact uses the last 100 appearances. On-court and off-court plus-minus are each shrunk by 250 minutes toward zero. Off-court minutes are team minutes divided by 5, minus the player’s minutes, and cannot be negative. Off-court plus-minus is the team margin minus the player’s plus-minus.
counts absentees. counts those absentees whose expected minutes are at least 20. Missing minutes and missing impact sum the absentees’ expected minutes and weights. Available impact sums the weights of players who played.
The baseline is the mean missing impact over the team’s earlier completed games this season. Upcoming games repeat the last completed lineup, then use the same weights. The saved logistic and boosting models were trained on who actually played.
Logistic regression
Missing inputs are filled with the training median, then each column is standardised with the training mean and the training standard deviation (divisor ). The score is on that standardised scale, not the raw feature scale.
The penalty is L2 with , a maximum of 2,000 iterations, and an unpenalised intercept. is scikit-learn’s inverse penalty strength. A coefficient says how the standardised feature pushes the log-odds, with the other standardised features held fixed.
Histogram gradient boosting
This is scikit-learn’s , not LightGBM. It does not use the logistic imputation or standardisation. Missing values stay missing and the trees handle them. Each tree is added at learning rate 0.08:
Two hundred iterations, depth 3, at least 40 samples in a leaf, L2 regularisation 1, early stopping off, and . The settings were chosen on 2020-21 and then frozen.
Training cut and the live refit
The Model Lab fit uses completed games with a season start year before 2021 as training, and 2021-22 onward as the test. Upcoming games are in neither set. Rows are ordered by season, date and game id. The Elo home-court value of 55 was tuned on 2016-17 through 2020-21.
Refresh slate fits the same two models again on every completed game and saves those pipelines for the slate. The Model Lab numbers stay the fixed holdout.
How a probability is scored
Before log loss, accuracy and Brier score, a probability is clipped to . for a home win.
Reliability uses ten quantile bins. Each bin compares the mean predicted probability with the share of home wins. The same three scores are also computed for 0, 1, 2, 3 and 4 or more key players missing, adding both teams.