Machine Learning Foundations
This course is the general trunk of machine learning. It builds on Introduction to AI (the ideas) and Math Foundations (the tools), and turns them into working models. By the end you will understand the modeling workflow, fit regression and classification models, train naive Bayes, decision trees, k-means clustering, and PCA, and — most importantly — evaluate a model honestly so you can tell a real result from a fooled one.
Every module is hands-on and runs entirely in your browser: you will drag a regression line until the error shrinks, watch k-means centroids slide into place, grow a decision tree split by split, and see a model overfit in real time. Each module also shows you the matching scikit-learn code — read-only, so you can recognize it later, with nothing to install now. Each ends with a short mastery check; pass it to mark the module complete.
Start here
Module 1The Modeling Workflow
Data → features → model → loss → train → evaluate, and the train/test split that keeps you honest. Supervised vs. unsupervised; regression vs. classification. Activity: run an example through a live pipeline, then sort real tasks by type.
Supervised learning
Module 2Regression — Fitting a Line
Predicting a number. Residuals, squared error, and the line of best fit. Activity: drag a line over real points and watch the error fall — then let it auto-fit. AI anchor: price and demand prediction.
Module 3Classification — Drawing Boundaries
Predicting a category. k-nearest-neighbors, decision boundaries, and probability outputs. Activity: drop a new point and watch its neighbors vote, with an adjustable k. AI anchor: spam, medical, and image classifiers.
Module 4Naive Bayes
Turning Bayes’ rule into a classifier. The independence assumption and why it works anyway. Activity: a live spam filter — toggle words and watch the spam probability update. AI anchor: real spam and sentiment filters.
Module 5Decision Trees
Yes/no questions that carve up the data; impurity, greedy splits, and depth. Activity: grow a tree with a depth slider and watch it partition the plane — and start to overfit. AI anchor: random forests and gradient boosting.
Unsupervised learning
Module 6Clustering — k-means
Finding groups with no labels at all. Centroids, the assign-and-update loop, and choosing k. Activity: step k-means and watch the clusters snap into place; inertia falls each round. AI anchor: customer segmentation.
Module 7Dimensionality Reduction — PCA
Too many features; find the directions that carry the most signal. Variance, principal components, and projection. Activity: rotate a projection line and watch retained variance peak on the first component. AI anchor: visualizing embeddings.
Honest evaluation · Capstone
Module 8 · CapstoneHonest Evaluation — Overfitting, Cross-Validation & Bias–Variance
The skill that separates real ML from self-deception. Watch a model overfit as you raise its complexity — training error falls while test error turns back up — and learn how cross-validation and the bias–variance tradeoff keep you honest. Ties every earlier module together.