Machine Learning, Visualised

Classifiers, regressors, clustering and the evaluation metrics that tell you whether any of it worked.

45 modules Free, no login Updated 21 October 2026

About this track

A machine learning model is easier to trust once you have watched it get things wrong. Every module in this track puts the model on screen with the controls that drive it, so you can push it into failure on purpose: set k to 1 and watch KNN overfit, unbalance the classes and watch accuracy stay high while the model becomes useless.

The track runs from splitting data through the classical algorithms - linear regression, KNN, decision trees, naive Bayes, SVM, k-means - and ends on the evaluation and drift questions you hit once a model is real.

Nothing here requires a library. Each model is implemented in the page itself and run in front of you, so the numbers in the readout are computed by the same code that draws the picture rather than quoted from somewhere else.

What you will be able to do

How the track is ordered

The track opens with the two things that come before any model: how to split data, and how to tell whether a result means anything. Then it works through the classical algorithms roughly in order of how much machinery they need - linear and logistic regression, KNN, naive Bayes, decision trees, random forests, SVM - and finishes on unsupervised methods and the evaluation metrics that apply across all of them. It assumes you are comfortable with a graph and an equation; the maths track covers anything heavier.

Where this leads

Logistic regression is a single neuron, so the deep learning track continues directly from here. If the modelling is clear but the data handling is not, the databases track covers where the data comes from, and the algorithms track covers the complexity arguments that decide whether a method scales.

All 45 modules, in teaching order

  1. 01Train-Test Split MethodSee why testing on data you trained on flatters a model, and how holding out a test set gives you an honest score.
  2. 02Feature ScalingApply min-max and standard scaling to raw features. See which models need scaled inputs, which ignore them, and what happens when one column dominates.
  3. 03Data LeakageSpot data leakage in a pipeline before it inflates your metrics. See train-test contamination, target leakage, and preprocessing leaks with examples.
  4. 04Handling Missing ValuesLearn four strategies for handling missing data. Watch each method change predictions on the same dataset and pick the one that fits.
  5. 05Outliers and InfluenceMove one data point and watch the regression line follow it. Use Cook's distance and hat values to find the rows that control your model.
  6. 06PipelinesChain preprocessing and modelling into one pipeline object that prevents data leakage and locks every step into the correct order.
  7. 07Label Encoding ProcessTurn categories into integers, and see where label encoding is safe and where it invents an ordering your model will believe.
  8. 08One-Hot EncodingExpand a categorical column into binary columns and see how one-hot encoding avoids implying an order that was never there.
  9. 09Linear Regression with OLSDrag a regression line by hand and watch the residuals and mean squared error react, then let least squares find the optimum.
  10. 10Evaluation Metrics for RegressionCompare MAE, MSE, RMSE and R-squared on identical predictions and see which kinds of error each metric punishes hardest.
  11. 11Logistic RegressionFit a linear score, squash it through a sigmoid, and read the probability anywhere on the plot. See why the boundary is always a straight line.
  12. 12K-Nearest NeighborsDrop a new point on the plane and watch KNN classify it by neighbour vote. Change k to see the decision boundary tighten or smooth.
  13. 13Confusion Matrix AnalysisSee why accuracy alone misleads. Build a confusion matrix cell by cell and watch precision, recall and F1 shift with every prediction.
  14. 14Precision, Recall and F1Build a confusion matrix, then adjust the threshold and watch precision trade against recall while F1 tries to balance them both.
  15. 15ROC Curve and AUCDrag a threshold through two overlapping score distributions and watch the ROC curve, AUC and precision respond - including the imbalance trap.
  16. 16Precision-Recall against ROCDraw ROC and precision-recall curves from the same predictions. See why a model that looks strong on ROC can fail on imbalanced classes.
  17. 17Threshold TuningSlide the classification threshold from zero to one and watch precision, recall and cost shift. Find the cutoff that fits your problem.
  18. 18Decision Tree AnalysisWatch a decision tree choose each split by information gain, growing branch by branch until every leaf holds a single class.
  19. 19Random Forest and BaggingGrow one deep tree, then forty, and watch a jagged unstable boundary average into a smooth one. Bagging and feature subsampling, measured.
  20. 20Gradient BoostingAdd one small tree at a time, each fitted to the residuals left by the last. Watch the errors shrink, and watch it overfit when the trees get too deep.
  21. 21Naive Bayes ClassifierStep through Bayes' theorem on real text and see why a 'naive' independence assumption still classifies spam remarkably well.
  22. 22Support Vector MachinesAdd points from two classes and watch a support vector machine find the hyperplane with the widest possible margin between them.
  23. 23K-Means ClusteringPlace centroids and watch K-Means alternate between assigning points and recentring clusters until it converges.
  24. 24Principal Component AnalysisRotate a line through a point cloud and watch the variance it captures peak on exactly one angle. That angle is PC1, and the rest is what you lose.
  25. 25Cosine Similarity MetricMeasure similarity by angle instead of distance. Drag two vectors apart and watch the cosine similarity score respond in real time.
  26. 26K-Fold Cross ValidationWatch data split into k folds, each taking a turn as validation, and see why a single train/test split can flatter a model.
  27. 27Bias vs VarianceDial bias and variance up and down, resample the data, and watch a stable underfit turn into an unstable overfit.
  28. 28Learning CurvesPlot training and validation error against dataset size. Read the gap to decide whether more data or more model capacity will help.
  29. 29DBSCAN: Density-Based ClusteringSet epsilon and minPts, then watch DBSCAN grow clusters by density. See how it finds arbitrary shapes, labels noise, and never asks you to choose k.
  30. 30Hierarchical Clustering and DendrogramsBuild a clustering tree from pairwise distances and read a dendrogram to choose the number of clusters after the algorithm finishes.
  31. 31Choosing k: Elbow and SilhouetteRun the Elbow method and the Silhouette score on the same dataset. See what each one measures, where they disagree, and how to pick k when they do.
  32. 32Gaussian Mixture ModelsFit a Gaussian mixture and watch each point split its membership across clusters. Step through EM iteration by iteration and compare to hard k-means.
  33. 33t-SNE and UMAP beside PCAProject high-dimensional data with PCA, t-SNE and UMAP side by side. Learn which visual patterns are real structure and which are artifacts.
  34. 34Feature and Permutation ImportanceShuffle one feature at a time and measure the drop in accuracy. See why correlated features split the importance and how to handle it.
  35. 35Partial Dependence, ICE and SHAPPlot partial dependence, ICE curves and SHAP values for one feature. See where partial dependence hides interactions the others reveal.
  36. 36Probability CalibrationCheck whether predicted probabilities match observed frequencies. Apply Platt scaling and isotonic regression to close the gap.
  37. 37Isolation ForestWatch isolation forest flag anomalies by counting how few random splits isolate a point. Fewer splits means the data point is stranger.
  38. 38Stacking and Voting EnsemblesCombine trees, linear models and neighbours into one ensemble. Compare hard voting, soft voting and stacking on the same scored data.
  39. 39Grid Search against Random SearchCompare grid and random hyperparameter search side by side. See how random sampling covers more of the space with the same trial budget.
  40. 40Ridge and Lasso RegressionTurn lambda up and watch a wild polynomial calm down. Ridge shrinks every coefficient; Lasso drives the useless ones to exactly zero.
  41. 41Label Imbalance ProblemSee how a model scores 99% accuracy while missing every fraud case, and why imbalance breaks your intuition about metrics.
  42. 42Training on Imbalanced DatasetTry resampling, class weights and threshold tuning on an imbalanced dataset and watch minority-class recall respond.
  43. 43Hard vs Soft LabellingCompare a single hard label against a probability distribution, and see what a model loses when forced to pick one winner.
  44. 44Sliding Window for Time SeriesSlide a window across a time series to turn a raw sequence into supervised training rows of features and targets.
  45. 45Model and Data DriftFast-forward through production and watch a well-trained model decay as incoming data drifts away from what it learned.

Other tracks