Predicting NBA game outcomes using machine learning

Image for post
Image for post
📸 Photo by JC Gellidon on Unsplash

The objective of every coach is to win. Pre-game and in-game, they must decide which players deserve more minutes so the team can improve in key performance areas, and by extension, which areas should be focused on.

My goal was to predict ‘win’ or ‘loss’, taking measures of performance as input. The final model correctly classified 84.44% of unseen game data.

Coaches can estimate team performance categories, use this model to predict the outcome, then shuffle their lineups to target certain categories in their control that will output winning predictions.

My assumptions are…

An introductory ML algorithm to get started

In this article, we hope to provide a concise exploration of one of the most fundamental ML algorithms: Simple Linear Regression.

Linear regression is intuitive but powerful. For example: given a quantity of goods, we want to predict the price at which a company will sell. Data on past sales are represented by Xs on the chart. These contain actual data on how many goods the company sold (x-axis) and at what price (y-axis).

Image for post
Image for post
Simple Linear Regression with Quantity and Price

The goal of linear regression is to fit a line to the shape of the data points as close as possible. Then, for any given x…

Goal: Create and deploy an interactive visualization on the web

With a slew of data analysis, visualization, and machine learning tools, Python has quickly risen to prominence in the data science field. However, insights are more useful when they are publicly visible. This tutorial explains how to deploy a basic visualization to Heroku.

Image for post
Image for post
Final Result

We will use the following technologies:

  • Bokeh: An interactive data visualization library in Python
  • Flask: A micro web application framework for creating web apps
  • Heroku: A platform-as-a-service (PaaS) that hosts and runs web apps

Step 1: Virtual Environment Setup

A virtual environment isolates our Python libraries from our main installation. On Python 3.3 …

Sherwyn D’Souza

Software Developer, Computer Science and Business Student, and Open-Source Enthusiast. Deeply passionate about algorithms, data science, fintech, and economics.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store