<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: kmdspark5</title>
    <description>The latest articles on DEV Community by kmdspark5 (@kmdspark5).</description>
    <link>https://dev.to/kmdspark5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4261572%2Fbf616d0e-d74d-447c-bf60-64baed780d70.png</url>
      <title>DEV Community: kmdspark5</title>
      <link>https://dev.to/kmdspark5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kmdspark5"/>
    <language>en</language>
    <item>
      <title>I built a leak-free NBA dataset — and my model still doesn't beat the closing line</title>
      <dc:creator>kmdspark5</dc:creator>
      <pubDate>Tue, 24 Nov 2026 00:51:15 +0000</pubDate>
      <link>https://dev.to/kmdspark5/i-built-a-leak-free-nba-dataset-and-my-model-still-doesnt-beat-the-closing-line-mib</link>
      <guid>https://dev.to/kmdspark5/i-built-a-leak-free-nba-dataset-and-my-model-still-doesnt-beat-the-closing-line-mib</guid>
      <description>&lt;p&gt;Every NBA modeling tutorial makes the same quiet mistake: the features include information from the game being predicted. Season averages computed &lt;em&gt;including&lt;/em&gt; today's game, rolling stats that peek at the final score — the model looks brilliant in backtests and ordinary in production.&lt;/p&gt;

&lt;p&gt;So I built the dataset I actually wanted:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NBA Point-in-Time Team Features&lt;/strong&gt; — one row per game, 56 features per game (28 per team), where every single feature is computed only from games played &lt;em&gt;before&lt;/em&gt; tip-off:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Season-to-date per-game averages, blended with the team's previous-season final averages (10-pseudo-game weight) so early-season rows are stable&lt;/li&gt;
&lt;li&gt;Last-10-games form: scoring, defense, shooting, pace, plus/minus&lt;/li&gt;
&lt;li&gt;Percentages computed from cumulative makes/attempts, never by averaging percentages&lt;/li&gt;
&lt;li&gt;Exact box-score values for the awkward ones (blocks against, fouls drawn)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Free samples (no catch)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;79 games of 2026-27 on Kaggle: &lt;a href="https://www.kaggle.com/datasets/kmdspark5/nba-point-in-time-team-features-sample-2026-27" rel="noopener noreferrer"&gt;https://www.kaggle.com/datasets/kmdspark5/nba-point-in-time-team-features-sample-2026-27&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A runnable demo notebook (Gradient Boosting baseline): &lt;a href="https://www.kaggle.com/code/kmdspark5/predicting-nba-totals-with-leak-free-features" rel="noopener noreferrer"&gt;https://www.kaggle.com/code/kmdspark5/predicting-nba-totals-with-leak-free-features&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Code and README on GitHub: &lt;a href="https://github.com/kmdspark5/nba-point-in-time-features" rel="noopener noreferrer"&gt;https://github.com/kmdspark5/nba-point-in-time-features&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The honest part
&lt;/h2&gt;

&lt;p&gt;On the full 2025-26 season, a default Gradient Boosting model trained on this data scores &lt;strong&gt;RMSE 19.56 / MAE 15.56 / 39.2% of games within ±10 points&lt;/strong&gt;. Graded live in November 2026, it ran &lt;em&gt;worse&lt;/em&gt; than that (MAE 16.6, 26.7% within ±10 over 45 games). Early-season basketball is noisy.&lt;/p&gt;

&lt;p&gt;I also ran a separate 3-season walk-forward backtest of the model's predictions against closing totals (3,216 games). Betting the model's side on every game won &lt;strong&gt;48.7%&lt;/strong&gt; — it does not beat the line. Only at large divergences (|prediction − line| ≥ 8) did it reach 53.7% (807 bets, 95% CI roughly 50–57%), and the first two live flagged games both lost. That study is published too, with the full per-game data, because a backtest you can't inspect is just marketing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Full versions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Full dataset: 4,372 games, 2022-23 → 2026-27 ($19); Extended edition: 22,054 games back to 2005-06 ($39)&lt;/li&gt;
&lt;li&gt;The 3-season backtest with per-game predictions vs closing lines ($12)&lt;/li&gt;
&lt;li&gt;The model source code (Python, GB+RF ensemble) ($49)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Store: &lt;a href="https://kmdspark5.gumroad.com" rel="noopener noreferrer"&gt;https://kmdspark5.gumroad.com&lt;/a&gt; — launch code &lt;strong&gt;LAUNCH25&lt;/strong&gt; = 25% off until Nov 30, 2026.&lt;/p&gt;

&lt;p&gt;Interesting footnote: training on 21 seasons instead of 3 made the benchmark slightly &lt;em&gt;worse&lt;/em&gt; (RMSE 19.78 vs 19.56). More history is not free accuracy — the NBA of 2008 is not the NBA of 2026. Era-aware weighting is where the extra seasons should pay off, and that's the next experiment.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>dataset</category>
      <category>sports</category>
    </item>
  </channel>
</rss>
