Logo

Competition Prediction

Authors
  • avatar
    Name
    Kaden King
Slide 1

Competition Prediction

This was my final project in Artificial Intelligence at Freed-Hardeman University. The premise was straightforward: given two teams, predict who wins. The result was a full-stack web app where users select any two MLB, NFL, or NBA franchises and receive a machine-learning-generated prediction.

The Models

Training data varied by sport — MLB games from 2021, NFL games from 2018–2021, and NBA games going back to the 1940s. Each game was encoded with home team, away team, and outcome (1 or 0), with teams mapped to unique IDs via Python dictionaries.

I trained and compared multiple model types for each sport, evaluating accuracy, precision, recall, and computation time. Decision Tree classifiers came out on top across all three sports — outperforming Support Vector Machines and Neural Networks on every metric while being significantly faster to run. The trained models are serialized as pickle files and served through a Python Flask API.

Architecture

The frontend is built with React and TypeScript, styled with Tailwind CSS. Team selection feeds into a request to the Flask backend, which loads the appropriate pickle model and returns a prediction. The frontend is deployed on Netlify; the research paper documenting the full methodology accompanies the project.

A local branch extends the project with statistical simulation endpoints for MLB and NBA — a separate approach that generates winning percentage predictions directly from team stats rather than supervised learning.

View on GitHub