Skip to main content
Harmanpreet Singh
All work

Independent project: Interactive learning tool

MLForge: an interactive machine-learning lab

A browser-only site that teaches machine learning by letting you change it: 75 lessons with live interactive labs and 20 guided end-to-end projects. Every model is written from scratch in TypeScript, so there is no server and nothing to install. It has helped over 5,000 users learn machine learning algorithms.

The MLForge neural network lab: a scatter of two classes with a learned decision boundary, train and test accuracy, a loss curve, and controls for dataset, hidden layers and neurons per layer.
The neural-network lab training live in the browser. Captured from the running app on my own machine, October 2026.

What it is

Most machine-learning teaching is either reading or a notebook you have to set up. MLForge puts the model in the page: every lesson has a lab where you drag the data, change a setting and watch the result move, then break it on purpose.

Each topic climbs a ladder: plain words, the interactive lab, the math, a pure-Python version, a NumPy version, the library version, quizzes on how it fails, real-world examples and interview questions. The 20 projects walk through whole systems, such as fraud detection or a RAG pipeline, with code you can copy into Colab.

My part

I designed and built the site, the lesson format and the from-scratch algorithms.

Independent project.

Stack

  • React 18
  • TypeScript
  • Vite
  • KaTeX
  • Python (notebook examples)

What is inside

A static React app with the algorithms and the lessons kept apart.

  1. 01

    Algorithms from scratch

    Linear and logistic regression, k-nearest neighbors, trees, forests, boosting, k-means, DBSCAN, PCA, a neural network with backpropagation, autograd, attention, BM25 and BPE are written in TypeScript, with no machine-learning library.

  2. 02

    Data-driven lessons

    Each lesson is a typed object (explanation, math, code, quizzes, interview questions). Adding a lesson means adding data and one lab component, not a new page.

  3. 03

    Lazy-loaded labs

    Each lab is its own code-split component, so a visitor only downloads the labs they open.

  4. 04

    Checked examples

    A script extracts every code snippet from every lesson and runs it with real Python, so the examples shown are code that executes.

The MLForge Labs page: a grid of cards for the fit-the-line playground, the decision-boundary explorer, the neighbourhood explorer, decision trees, K-means, DBSCAN, PCA and more.
The Labs index. Each card is an interactive tool. Captured from the running app on my own machine, October 2026.
An MLForge project page for fraud detection, with a pipeline from event stream to decision, tags for difficulty and time, and a step-by-step build below.
One of the 20 guided projects: fraud detection. Captured from the running app on my own machine, October 2026.