A visual companion to machine learning
Machine learning, illustrated.
See how a model works, from the whole pipeline to a single weight. Follow one penguin from raw measurements to a prediction, turn the dial on a model, and compare the different ways of answering the same question. Built for Machine Learning (CSI 330) at Muhlenberg College, Fall 2026. Every number is what scikit-learn computes on the course’s own data.
9 entries · 10 interactive studies · weeks 1–8, a growing reference
01 Explore by topic
Foundations 1 entry
Bias and variance Too simple, too flexible, and the error that tells them apartClassification 3 entries
k-nearest neighbors Classify a new bird by asking the most similar ones Logistic regression A line, then a squash, then a probability Gaussian naive Bayes Prior × likelihood, weighed on a balanceRegression 2 entries
Linear regression and least squares The line the springs settle on k-NN regression Predict a number by averaging the neighboursEvaluation 2 entries
Classification metrics One threshold, four kinds of answer Regression metrics MAE, RMSE and R² from the same missesValidation 1 entry
Cross-validation Every observation tested once, and the spread kept02 Building a model, in order
From a question to a number you can trust. Each step points to the machines that explain it; the number on the right is the panel of the pipeline above where it happens.
- Frame the question What is predicted, from what: a class or a number. k-nearest neighbors · Linear regression and least squares
- Split the data Hold back a test set before anything is learned. Cross-validation · Bias and variance
- Scale the features Put measurements on one footing, using the training data only. k-nearest neighbors
- Choose and fit a model A rule with weights, chosen to make the training loss small. Logistic regression · Gaussian naive Bayes · Linear regression and least squares · k-NN regression
- Turn scores into answers Probabilities, then a decision, with a threshold you choose. Logistic regression · Classification metrics
- Measure on the test set Count the kinds of right and wrong, or the sizes of the misses. Classification metrics · Regression metrics
- Validate the choice Rotate the held-out part to see how much the score moves. Cross-validation
Then compare the choices you made along the way in Why this, not that.