Note from Towards Data Science’s editors:_ While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details._


I enjoy basketball. It’s a fast-paced competitive game and I’ve enjoyed both playing and watching it for a long time. The NBA is famous for generating very clean data, which has long been used by enthusiasts (like myself) for data visualizationsmodeling and game predictions.

Recently, I was contacted by DraftKings regarding an interview for a potential job. As part of my preparations for the same, I started using their platform and competing in mock competitions to get acquainted with the DraftKings (DK) contest process. It was during this time period that I really started getting into the idea of using data to model and predict a winning roster.

I built the algorithm iteratively, and from scratch- starting with a naive version 1, a more robust version 2 and currently I’m working on a winning version 3.

I built the algorithm iteratively, and from scratch

You can follow along my algorithm design journey in the rest of the article.

Quick Level Set: Scoring and Rules

DK’s rules and scoring for their NBA classic fantasy contests are fairly intuitive, even if you have no prior basketball knowledge. In a nutshell, the objective is to:

Create an 8-player lineup while staying under the $50,000 salary cap.

Players get different points for different actions (more details below) and the draft with the most number of points, at the end of all games in a night, wins. Sounds simple enough :)

The breakdown for different actions that result in positive (or negative) points can be seen below.

Image for post

NBA Fantasy points breakdown- DraftKings. Photo by Author.

One last constraint which makes drafting slightly more complicated is player positions. According to DK: Lineups will consist of 8 players and must include players from at least 2 different NBA games.

#algorithms #nba #data-science #sports-analytics #basketball #data analysis

Can an algorithm pick a winning NBA Fantasy Draft?
1.75 GEEK