Python & Data Science
Machine Learning Under review

Reference: Algorithm Subcategory Map

A single tree showing the family relationships between every supervised-learning algorithm covered in this article set. Each leaf points to the article that covers it. Linked from each article’s πŸ“š References toggle.

The map

Algorithms
β”‚
β”œβ”€β”€ Supervised (labelled y)
β”‚   β”‚
β”‚   β”œβ”€β”€ Tree-based  ─── decisions encoded as a flowchart of yes/no splits
β”‚   β”‚   β”œβ”€β”€ Decision Tree ............. classical-ml-foundations-p05
β”‚   β”‚   β”œβ”€β”€ Random Forest (including vs. Boosting comparison) ... classical-ml-foundations-p06
β”‚   β”‚   β”œβ”€β”€ Gradient Boosting (XGBoost, LightGBM, CatBoost) ......... classical-ml-foundations-p04
β”‚   β”‚   └── Stacking / Ensemble ....... classical-ml-foundations-p12
β”‚   β”‚
β”‚   β”œβ”€β”€ Linear  ─── one weighted sum per output
β”‚   β”‚   β”œβ”€β”€ Linear Regression ......... classical-ml-foundations-p02 (gradient descent), causal-* (backdoor)
β”‚   β”‚   β”œβ”€β”€ Logistic Regression ....... causal-inference-p01 (the email), causal-inference-p06 (propensity score)
β”‚   β”‚   └── Regularized (L1 Lasso / L2 Ridge) ..... classical-ml-foundations-p03
β”‚   β”‚
β”‚   β”œβ”€β”€ Distance-based  ─── "find me the K nearest neighbours and vote"
β”‚   β”‚   └── KNN ...................... classical-ml-foundations-p08  (curse of dimensionality lives here)
β”‚   β”‚
β”‚   β”œβ”€β”€ Probabilistic  ─── models P(feature | class)Β·P(class) as the joint, then inverts via Bayes' rule for the class posterior
β”‚   β”‚   └── Naive Bayes .............. classical-ml-foundations-p09
β”‚   β”‚
β”‚   β”œβ”€β”€ Kernel  ─── linear-in-a-higher-space
β”‚   β”‚   └── SVM (Support Vector Machine) ..... classical-ml-foundations-p07
β”‚   β”‚
β”‚   β”œβ”€β”€ Time-series  ─── y is itself, indexed by time, with autocorrelation
β”‚   β”‚   β”œβ”€β”€ ARIMA / SARIMA ........... arima-and-sarima-intuitively-when-classical-foreca
β”‚   β”‚   β”œβ”€β”€ Classical vs ML .......... classical-forecasting-vs-machine-learning-when-doe
β”‚   β”‚   β”œβ”€β”€ Prophet .................. prophet-vs-statistical-models-a-practical-forecast
β”‚   β”‚   β”œβ”€β”€ Gradient Boosting for time .... gradient-boosting-for-time-series-using-lightgbm-t
β”‚   β”‚   └── Cross-validation for time ...... time-series-cross-validation-why-k-fold-breaks-on
β”‚   β”‚
β”‚   └── Deep Learning  ─── many stacked layers, learned representations
β”‚       β”œβ”€β”€ Single Neuron / Perceptron ........ attention-from-scratch-p01
β”‚       β”œβ”€β”€ Backpropagation ........... attention-from-scratch-p02
β”‚       β”œβ”€β”€ CNN (image / spatial) ...... attention-from-scratch-p04
β”‚       β”œβ”€β”€ RNN (sequence), LSTM, GRU .. attention-from-scratch-p05, attention-from-scratch-p06
β”‚       β”œβ”€β”€ Attention mechanism ........ attention-from-scratch-p07, attention-from-scratch-p08
β”‚       β”œβ”€β”€ The full Transformer ...... attention-from-scratch-p09
β”‚       β”œβ”€β”€ Transfer learning .......... attention-from-scratch-p10
β”‚       β”œβ”€β”€ Regularization (BatchNorm, Dropout) ........ attention-from-scratch-p11
β”‚       └── Debug training ............. attention-from-scratch-p12
β”‚
β”œβ”€β”€ Unsupervised (no y)  ─── out of scope for this set
β”‚   β”œβ”€β”€ Clustering (K-means, hierarchical, HDBSCAN)
β”‚   └── Dimensionality reduction (PCA, t-SNE, UMAP)
β”‚
└── Reinforcement Learning  ─── out of scope for this set

One-line definitions per subfamily

  • Tree-based: splits the feature space with yes/no rules; predictions are averages (regression) or majority votes (classification) at the leaves. Interpretable, handles mixed types, doesn’t need scaling.
  • Linear: one weighted sum per output. Fast, interpretable β€” fits when you need coefficient interpretability or have few informative features. Religious about scaling for feature comparison.
  • Distance-based: predicts by looking up the K closest training rows and voting. Non-parametric; needs scale-normalized features; dies in high dimensions.
  • Probabilistic: models P(class | features) via Bayes’ rule with a β€œnaive” independence assumption. Cheap, fast, surprisingly strong on text.
  • Kernel: linear classification in a high-dimensional space the data is lifted into via a kernel function. SVM is the flagship; the widest-margin intuition is the concept.
  • Time-series: the order of rows matters. Standard CV breaks; special walk-forward CV applies. Roughly splits into statistical (ARIMA, Prophet) and ML gradient-boosting approaches.
  • Deep Learning: many stacked layers learn a representation automatically. The choice between CNN (spatial), RNN (sequence), and Transformer (attention) is the first big fork.

The big forks (the call when deciding where to start)

  1. Is y labelled? No β†’ unsupervised (out of scope here). Yes β†’ supervised.
  2. If labelled, is y structured by time? Yes β†’ time-series subfamily. No β†’ flat supervised.
  3. If flat supervised, how much data, what shape are the features?
    • Small-ish, tabular, mixed types, non-linear interactions β†’ tree (Random Forest or XGBoost) β€” this shape of data is where trees fit without extra preprocessing.
    • Few informative features, want interpretability β†’ linear / regularized linear.
    • Many features, want to rank by importance still β†’ gradient boosting.
    • Small-to-medium samples, high-dimensional features, a margin between classes matters β†’ kernel / SVM.
    • Low-dimensional features, a meaningful distance metric, no training budget β†’ KNN.
    • High-dimensional sparse counts (especially text), and the independence assumption is tolerable β†’ naive Bayes.
    • Image / audio / very-long-text β†’ deep learning (CNN for images, Transformer for text).
  4. If deep, is the input spatial (img), sequential (text/time), or both? spatial β†’ CNN; sequential β†’ RNN/LSTM or Transformer. Transformers fit when sequences are short enough for quadratic attention and the compute is affordable; recurrent models still fit streaming inference, very long sequences under memory limits, or small data.

Sensible couplings: metric ↔ algorithm ↔ problem

ProblemAlgorithm familyDefault metricWhy
Binary classification, balancedanyaccuracy / F1both classes matter equally
Binary classification, imbalancedanyrecall-at-fixed-precision + PR-AUCaccuracy lies; the rare class is the point
Probabilistic decision (insurance, loan)calibratedlog-loss + calibration curvedownstream uses the probability itself
Regression, outliers presentlinear/treeMAE and MAPEMAE is robust; MSE would chase outliers
Forecast across multiple seriestime-seriesMASEscale-free, comparable across series
Ranking items (rec engine)tree/deepROC-AUC / NDCGorder matters, not the predicted value

See evaluation-metrics.md for the full metric roster.

Cross-references into the articles

  • The whole classical-ML walk: start at classical-ml-foundations-p01-can-you-explain-the-bias-variance-tradeoff-in-plai.md (the Archer and the Target).
  • The whole attention walk: start at attention-from-scratch-a-deep-p01-neural-networks-without-the-calculus-what-s-actual.md.
  • The whole causal-inference walk: start at causal-inference-in-python-p01-correlation-isn-t-causation-and-now-you-can-do-som.md.
  • Picking the right metric after the algorithm: evaluation-metrics.md.
  • Activation functions inside deep nets: activation-functions.md.

Further reading

  • Hastie, Tibshirani & Friedman (2009). The Elements of Statistical Learning. β€” the textbook that organizes every supervised algorithm in this tree.
  • Bishop (2006). Pattern Recognition and Machine Learning. β€” chap. 3–4 for linear, chap. 6–7 for kernels and SVM, chap. 14 for trees + ensembles.
  • Goodfellow, Bengio & Courville (2016). Deep Learning. β€” the cannon for the deep-learning leaf.
  • Efron & Hastie (2016). Computer Age Statistical Inference. β€” the bridge between classical stats and modern ML that this map glosses over.
  • Kaggle β€” House Prices: Advanced Regression Techniques (tree-based on tabular).
  • Kaggle β€” Spaceship Titanic (mixed tree/linear baseline on tabular).
  • Kaggle β€” Store Sales – Time Series Forecasting (the time-series leaf on a real problem).
  • Machine Learning Under review

    Reference: Feature Engineering

    A standalone lookup for feature engineering: pick the right encoder, scaler, derived feature, time-series construct, and distance metric for any model family.

  • Machine Learning Under review

    Reference: Cross-Validation

    A practical reference cataloguing every cross-validation variant, when to reach for each, and the leakage traps that turn CV from a safeguard into a mirage.

  • Machine Learning Under review

    What Is Cross-Validation, and How Do You Avoid Doing It Wrong?

    Learn cross-validation the right way: stop overfitting, prevent data leakage with pipelines, read the standard deviation, and handle time-series correctly.

  • Machine Learning Under review

    Reference: Distance Metrics

    A practical reference to eight common distance metrics with a decision tree for picking the right one based on your data's geometry and dimensionality.

Looking for something else?

Search every article by title, summary or topic.