Skip to main content
Harmanpreet Singh
All work

Independent project: Full-stack data and ML application

UFC Fight Intel: fight predictions and a public record

An unofficial fan project that scrapes UFC results and fighter statistics, trains a win-probability model, and publishes a prediction for every upcoming bout with its cutoff time, top factors and a public record of how earlier predictions did, next to a fight card dashboard, rankings, fighter comparisons and a data assistant.

What it is

The model is a deliberately plain, interpretable one: an L2-regularized logistic regression over 17 pre-fight difference features, chosen over a neural network because it already beat the Elo baseline on every metric and a reader can see which inputs drove a probability.

Each fighter's features are rebuilt from bouts strictly before the cutoff, rates come from counts over minutes fought, and training uses both corner orders so swapping the fighters swaps the two probabilities exactly.

In the project's chronological backtest (5,164 training bouts and 152 test bouts over a 10-year window) it beat the Elo baseline on log loss (0.571 against 0.693), Brier score (0.192 against 0.250) and accuracy (70.4% against 56.6%). The test set is small, and the app says so on its predictions and methodology pages.

My part

I built the scraper, the data pipeline, the model and the web app.

Independent project. Predictions are statistical estimates, not betting advice.

Stack

  • Next.js
  • TypeScript
  • MongoDB
  • Python
  • scikit-learn
  • Tailwind CSS 4
  • Docker Compose

What is inside

A scraper and Python enrichment scripts fill MongoDB; one feature pipeline feeds the model and the backtest; a Next.js app serves the pages, a REST API and the assistant.

  1. 01

    Scraper

    A Node scraper solves the site's SHA-256 challenge once per session, rate-limits itself and upserts bouts and fighters by their source ids, so re-running never duplicates anything. Data checks report violations instead of ingesting them.

  2. 02

    Enrichment

    Python scripts add official division rankings, fighter portraits and full professional records from a second public source.

  3. 03

    Features and model

    Elo, age, reach, experience, decay-weighted recent form, striking and grappling rates, layoff and opponent quality feed an Elo baseline and the logistic regression.

  4. 04

    Public record

    Each prediction stores its model version, cutoff, top factors and a data-confidence flag, and settled predictions are scored automatically on later runs.

  5. 05

    Assistant

    The assistant answers only through controlled app functions, names its fighters and sources, links to the evidence and says when data is missing.