Can Machine Learning Models be used to predict an NBA player’s points per game for the 2025-26 season?
Every summer fans and front offices ask the same thing: how many points will this player score next season? As a curious fan who’s really aiming to get into sports analytics, I wanted to find this out for myself. I started by pulling csv files of player stats (and advanced stats) from the last 20 years from basketball reference and building a clean dataset for modeling. That alone wasn’t getting me results I was happy with, so I added the missing context: which team each player is going to be on next season. I brought in a richer historical file from Kaggle, cleaned names, normalized old team codes, and kept one primary row per player season. From there I built the target straight from the data as PTS_next and tagged each row with team_next, the player’s primary team the following year. Now the model could actually learn how role changes with a new team.
Since who you play with matters, I added teammate context. For each player I computed teammate features on the next team, like average points and minutes of the other guys, without letting the player’s own numbers leak in. The idea of my model is to have last season’s stats plus next season’s team context goes in, and have next season’s PPG comes out.
I tested a handful of models and compared them with cross validation and a held out split. Gradient Boosting came out on top. After tuning the learning rate, number of trees, and depth, I was able to tune the model to reach a cross validated R squared around 0.78, test R squared around 0.75, and RMSE near 3.0 points per game. That is solid for year ahead PPG given how much roles, minutes, and injuries move around.
I wrapped everything into a clean pipeline, dummifying for team, the teammate features, and the tuned Gradient Boosting model. Then I added a simple function where I can type names like Anthony Davis and Jimmy Butler and instantly get a 2025–26 PPG projection. The big lesson is that context means everything. Fans and front offices want to know what a player will do next season, and the answer gets a lot better once you tell the model who his teammates are going to be. After working on this project, I’m even more pumped to keep building in sports analytics and turn messy sports data into useful insights. See the output below, and if you want to replicate this project, check out my GitHub!
Predicted Points Per Game for 6 NBA Players Going into the 2025-26 Season