jinming99/learn-ml-by-building

Jupyter Notebook

77

129 commits

updated Oct 12, 2026

See the code

README


Machine Learning,
from the inside out.

See the model. Stress the assumptions. Understand the behavior.

NOTEBOOKS → VISUAL EXPERIMENTS → PROJECTS → QUESTIONS


Course site 19 interactive lectures 3 build projects MIT license


This repository is Ming Jin's workshop floor for ECE 4424 / CS 4824: Machine Learning. The notebooks favor experiments, visual explanations, and real systems over long stretches of passive theory. Curiosity is required; advanced mathematics is not.

[!TIP] Looking for the polished course experience? Visit the course site. Looking to tinker? Pick a notebook below and make something behave strangely.

Course map

Arc#TopicNotebookCompanion material
Let's predict00Environment setupopensetup guide
01What is machine learning?opencourse page · notes
02k-Nearest Neighborsopencourse page · notes
03Linear Regressionopencourse page · environment
04Gradient Descent & Optimizationopencourse page · teaching notes
05Probabilistic Classificationopencourse page
Let's understand06Evaluation Pitfalls & Data Visualizationopencourse page
07Regularization & Generalizationopencourse page · environment
08Modern Decision Treesopencourse page
09Ensemble Methodsopencourse page
10Kernel Methods & Gaussian Processesopencourse page
Let's discover11K-Means Clusteringopencourse page
12PCA & Dimensionality Reductionopencourse page · quickstart
13Neural Network Architectureopencourse page
14Understanding Transformersopencourse page
Let's see & chat15Convolutional Neural Networksopencourse page
16Recurrent Neural Networksopencourse page
17LLM Agents & Tool Useopencourse page
18Vision-Language Modelsopencourse page

Build something that bites back

Three projects, three ways to make a model reveal what it is doing.

KNN Music Recommender interface with album covers and a seed-song search

01 · KNN Music Recommender

Search a real music catalog, define what “similar” means, and listen critically when nearest neighbors get strange.

Brief · Notebook · Live demo

Emotion prompts separating into measurable directions across hidden neural-network layers

02 · Neural Archaeology

Excavate hidden states layer by layer, find the geometry of a concept, and test whether it can predict—or change—behavior.

Brief · Notebook

A real QuixBugs error moving through observe, reason, patch, and verify steps

03 · Thought Cascade

Give a small language model tools and feedback, then measure when a reasoning-and-action loop actually repairs broken code.

Brief · Notebook

Enter the lab

git clone https://github.com/jinming99/learn-ml-by-building.git
cd learn-ml-by-building

python3 -m venv ml_lectures_env
source ml_lectures_env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

jupyter notebook

For platform-specific help, begin with the environment setup guide. Basic Python, high-school mathematics, and a willingness to poke at models are enough to start.


These materials were directed, reviewed, and validated by the instructor. AI-assisted tools were used during development to model transparent, modern technical practice. Released under the MIT License.

jinming99/learn-ml-by-building

Jupyter Notebook

77

129 commits

updated Oct 12, 2026

See the code

README


Machine Learning,
from the inside out.

See the model. Stress the assumptions. Understand the behavior.

NOTEBOOKS → VISUAL EXPERIMENTS → PROJECTS → QUESTIONS


Course site 19 interactive lectures 3 build projects MIT license


This repository is Ming Jin's workshop floor for ECE 4424 / CS 4824: Machine Learning. The notebooks favor experiments, visual explanations, and real systems over long stretches of passive theory. Curiosity is required; advanced mathematics is not.

[!TIP] Looking for the polished course experience? Visit the course site. Looking to tinker? Pick a notebook below and make something behave strangely.

Course map

Arc#TopicNotebookCompanion material
Let's predict00Environment setupopensetup guide
01What is machine learning?opencourse page · notes
02k-Nearest Neighborsopencourse page · notes
03Linear Regressionopencourse page · environment
04Gradient Descent & Optimizationopencourse page · teaching notes
05Probabilistic Classificationopencourse page
Let's understand06Evaluation Pitfalls & Data Visualizationopencourse page
07Regularization & Generalizationopencourse page · environment
08Modern Decision Treesopencourse page
09Ensemble Methodsopencourse page
10Kernel Methods & Gaussian Processesopencourse page
Let's discover11K-Means Clusteringopencourse page
12PCA & Dimensionality Reductionopencourse page · quickstart
13Neural Network Architectureopencourse page
14Understanding Transformersopencourse page
Let's see & chat15Convolutional Neural Networksopencourse page
16Recurrent Neural Networksopencourse page
17LLM Agents & Tool Useopencourse page
18Vision-Language Modelsopencourse page

Build something that bites back

Three projects, three ways to make a model reveal what it is doing.

KNN Music Recommender interface with album covers and a seed-song search

01 · KNN Music Recommender

Search a real music catalog, define what “similar” means, and listen critically when nearest neighbors get strange.

Brief · Notebook · Live demo

Emotion prompts separating into measurable directions across hidden neural-network layers

02 · Neural Archaeology

Excavate hidden states layer by layer, find the geometry of a concept, and test whether it can predict—or change—behavior.

Brief · Notebook

A real QuixBugs error moving through observe, reason, patch, and verify steps

03 · Thought Cascade

Give a small language model tools and feedback, then measure when a reasoning-and-action loop actually repairs broken code.

Brief · Notebook

Enter the lab

git clone https://github.com/jinming99/learn-ml-by-building.git
cd learn-ml-by-building

python3 -m venv ml_lectures_env
source ml_lectures_env/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

jupyter notebook

For platform-specific help, begin with the environment setup guide. Basic Python, high-school mathematics, and a willingness to poke at models are enough to start.


These materials were directed, reviewed, and validated by the instructor. AI-assisted tools were used during development to model transparent, modern technical practice. Released under the MIT License.