---
title: "Machine Learning"
description: "34 topics in Computing, in the order they build on each other."
canonical: https://lightmysky.com/learn/computing/areas/machine-learning
source: https://lightmysky.com/learn/computing/areas/machine-learning.md
retrieved: 2026-09-02
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Machine Learning

34 topics in Computing, in the order they build on each other.

Page: https://lightmysky.com/learn/computing/areas/machine-learning

- [Joint, Marginal and Conditional Probability](https://lightmysky.com/learn/computing/joint-marginal-and-conditional-probability-mt__Rj-hOSMEw): Learning from data means reasoning about several uncertain quantities at once. The joint distribution holds everything, the marginal sums out what is not of interest, and the conditional is what remains once something is known.
- [Bayes' Rule and Updating a Belief](https://lightmysky.com/learn/computing/bayes-rule-and-updating-a-belief-mt_A4p5--f7Io): Bayes' rule turns the probability of evidence given a cause into the probability of the cause given the evidence. It explains why a test that is right almost always can still be wrong most of the time it fires, when what it looks for is rare.
- [Likelihood and the Maximum Likelihood Estimate](https://lightmysky.com/learn/computing/likelihood-and-the-maximum-likelihood-estimate-mt_crcBnSqkTE): Given data and a family of models, the likelihood is how probable the data would be under each candidate. Choosing the candidate that maximises it is where most fitting procedures come from, including the least squares line.
- [Data as a Matrix: Rows, Features and the Target](https://lightmysky.com/learn/computing/data-as-a-matrix-rows-features-and-the-target-mt_KEN-TU1Gpn): Almost every method takes the same shape of input: one row per example, one column per feature, and a separate target column. Getting real data into that shape means encoding categories, scaling columns onto comparable ranges, and deciding what one row is.
- [Linear Regression by Least Squares](https://lightmysky.com/learn/computing/linear-regression-by-least-squares-mt_QRRkpIrwWs): Fit a straight relationship by choosing coefficients that make the sum of squared residuals as small as possible. With several features the same idea gives a plane or hyperplane, and each coefficient reads as the effect of one feature with the others held fixed.
- [Gradient Descent: Following the Slope Downhill](https://lightmysky.com/learn/computing/gradient-descent-following-the-slope-downhill-mt_EjfIT1WgMX): When no formula gives the best parameters, start somewhere and repeatedly step against the slope of the error. The step size decides whether the search creeps, oscillates or diverges, and this one procedure trains almost everything that follows.
- [Logistic Regression and the Decision Boundary](https://lightmysky.com/learn/computing/logistic-regression-and-the-decision-boundary-mt_FaVIaT7xl2): For a yes-or-no target, squeeze a linear score through a function that returns a probability, and fit by maximising likelihood. Where that probability crosses a chosen threshold is the decision boundary, and moving the threshold trades one kind of mistake for the other.
- [Overfitting and the Bias-Variance Trade-off](https://lightmysky.com/learn/computing/overfitting-and-the-bias-variance-trade-off-mt_xznyNxeNNw): A model flexible enough to fit the noise will do it, and then fail on anything new. Error splits into bias from a model too simple to represent the pattern and variance from a model too sensitive to the particular sample it saw.
- [Regularisation: Charging for Complexity](https://lightmysky.com/learn/computing/regularisation-charging-for-complexity-mt_RVgsDP0XzP): Add a penalty on the size of the coefficients to the thing being minimised, and the fit pulls back from chasing noise. A squared penalty shrinks everything smoothly, an absolute one drives some coefficients to zero and selects features on the way.
- [Cross-Validation and Honest Model Selection](https://lightmysky.com/learn/computing/cross-validation-and-honest-model-selection-mt_YG7X3HYCrT): Every choice made by looking at a set of data uses that set up, so the score on it stops being an estimate of future performance. Splitting into folds, and holding a final set back untouched, is how a reported number stays believable.
- [Beyond Accuracy: Precision, Recall and the Cost of an Error](https://lightmysky.com/learn/computing/beyond-accuracy-precision-recall-and-the-cost-of-an-error-mt_BHGgZM7tak): On imbalanced data a model that always says no can be right almost every time and be useless. The confusion matrix separates the two kinds of mistake, and precision, recall and the curves over thresholds say which model suits which cost.
- [Decision Trees and Ensembles](https://lightmysky.com/learn/computing/decision-trees-and-ensembles-mt_xo9EEd4R1i): A tree splits the data one question at a time, choosing each split to make the resulting groups purer. One tree is easy to read and unstable; averaging many trees grown on resampled data trades that readability for accuracy.
- [Clustering: Structure Without Labels](https://lightmysky.com/learn/computing/clustering-structure-without-labels-mt_BAMGOlWgRY): With no target column, the question becomes which examples resemble each other. K-means alternates assigning points to the nearest centre and moving the centres, and the awkward parts are choosing k, choosing a distance, and deciding whether the groups mean anything.
- [Principal Components and Dimensionality Reduction](https://lightmysky.com/learn/computing/principal-components-and-dimensionality-reduction-mt_l-9XHg_ChZ): When features are many and correlated, most of the variation lies along a few directions. Principal component analysis finds those directions from the covariance structure and re-expresses each example in far fewer numbers, which makes data visible and models cheaper.
- [From Perceptron to Multilayer Network](https://lightmysky.com/learn/computing/from-perceptron-to-multilayer-network-mt_TTa7KN1-IO): A single artificial neuron is a linear score with a threshold, and it cannot separate patterns that are not linearly separable. Stacking layers with a non-linear function between them removes that limit, because the middle layers build features of their own.
- [Backpropagation: Assigning Blame for an Error](https://lightmysky.com/learn/computing/backpropagation-assigning-blame-for-an-error-mt_5bwaSWfF96): Training a network means knowing how much each weight contributed to the error, which the chain rule gives by passing derivatives backwards through the layers. Every weight is then nudged by gradient descent, and the whole procedure is one pass forward and one pass back.
- [Deep Learning: Convolution, Sequence and Scale](https://lightmysky.com/learn/computing/deep-learning-convolution-sequence-and-scale-mt_karzGN5JnI): Deep networks work because their architecture matches the data: convolution shares weights across positions in an image, and sequence models carry information along a sentence. What changed in practice was scale, in data and in the hardware that could process it.
- [Attention as a Learned Lookup](https://lightmysky.com/learn/computing/attention-as-a-learned-lookup-mt_rrdtS1lHvC): Attention scores a query against every key in the sequence, turns the scores into weights, and returns a blend of the matching values. Nothing about distance is fixed in advance, so a position can read from anywhere, and the price is a comparison against everything.
- [The Transformer Block: Heads, Residuals and Normalisation](https://lightmysky.com/learn/computing/the-transformer-block-heads-residuals-and-normalisation-mt_eKC2IehaDT): One block stacks multi-head attention and a position-wise network around a residual path, with normalisation holding the scale steady. Attention treats a sequence as a set, so position has to be supplied explicitly or the block cannot tell an order from a shuffle.
- [Tokenisation and What a Model Actually Reads](https://lightmysky.com/learn/computing/tokenisation-and-what-a-model-actually-reads-mt_PW7s8qEiJD): A model never sees letters or words. It sees ids drawn from a vocabulary built by merging frequent pieces of text, and that vocabulary decides what is cheap to express, which spellings are fragile, and why digits and rare names behave badly.
- [Pretraining by Predicting the Next Token](https://lightmysky.com/learn/computing/pretraining-by-predicting-the-next-token-mt_D8b2phZJfp): Every position in a corpus is a labelled example asking what comes next, so the text supplies its own supervision. One objective, run over enough text, forces the model to carry grammar, facts and a rough sense of the task being asked of it.
- [Scaling Laws and the Compute Budget](https://lightmysky.com/learn/computing/scaling-laws-and-the-compute-budget-mt_tzl0sQblIM): Held-out loss falls as a smooth power of parameters, tokens and compute, which turns a training decision into arithmetic. The same curve shows where a budget is being wasted, usually on a model larger than the data it will ever see.
- [Adapting a Pretrained Model: Fine-Tuning and Low-Rank Updates](https://lightmysky.com/learn/computing/adapting-a-pretrained-model-fine-tuning-and-low-rank-updates-mt_NaA2iGtMPc): Most work starts from weights someone else paid for. A full fine-tune moves every parameter and costs a whole copy to store, while a low-rank update trains a small factored correction and leaves the base weights alone.
- [Generative Models: Learning a Distribution You Can Sample](https://lightmysky.com/learn/computing/generative-models-learning-a-distribution-you-can-sample-mt_3CHsmpWVX5): A generative model is judged by what it produces rather than by a label it predicts. Latent-variable models put a simple distribution behind the data and learn a decoder from it, which is what makes sampling easy and the likelihood awkward.
- [Diffusion Models: Learning to Undo Noise](https://lightmysky.com/learn/computing/diffusion-models-learning-to-undo-noise-mt_kZdQJ96iZ3): Training adds noise to a sample in small steps and asks the network to predict the noise that was added. Generation runs that chain backwards from pure noise, so one hard sampling problem becomes a long series of easy denoising ones.
- [Markov Decision Processes: States, Actions and Return](https://lightmysky.com/learn/computing/markov-decision-processes-states-actions-and-return-mt_bTCO27sgc6): Reinforcement learning begins by writing the problem down: states, actions, a transition rule, a reward and a discount. The return is the quantity being maximised, and the discount is the modelling choice that fixes how far ahead the agent looks.
- [Temporal-Difference Learning and Q-Learning](https://lightmysky.com/learn/computing/temporal-difference-learning-and-q-learning-mt_Z78E2llE0C): An agent that cannot see the transition probabilities can still learn a value by bootstrapping: move each estimate towards the reward plus the next estimate. Q-learning does this over state-action pairs and reaches the best policy while behaving by a different one.
- [Policy Gradients and the Actor-Critic Split](https://lightmysky.com/learn/computing/policy-gradients-and-the-actor-critic-split-mt_eXm6stg8zj): Instead of learning values and reading a policy off them, the policy can be a parameterised distribution trained directly by gradient ascent on expected return. The gradient is noisy, so a learned value function serves as a baseline to hold the variance down.
- [Learning from Human Preferences: Reward Models and Policy Optimisation](https://lightmysky.com/learn/computing/learning-from-human-preferences-reward-models-and-policy-optimisation-mt_yA1ud53Oy_): When the goal cannot be written as a reward, people compare pairs of outputs and a reward model is fitted to those comparisons. The language model is then optimised as a policy against that fitted reward, with a penalty for drifting away from where it started.
- [Training Across Many Devices: Data, Model and Pipeline Parallelism](https://lightmysky.com/learn/computing/training-across-many-devices-data-model-and-pipeline-parallelism-mt__e-JwIxHek): A run stops fitting on one device well before the interesting model sizes. Data parallelism copies the model and splits the batch, model parallelism splits the tensors, and pipeline parallelism splits the layers, each paying a different communication bill.
- [Serving a Model: Batching, the Key-Value Cache and Quantisation](https://lightmysky.com/learn/computing/serving-a-model-batching-the-key-value-cache-and-quantisation-mt_Nv1-WLGIO4): Generation is memory-bandwidth bound and runs one token at a time, so serving is a different problem from training. Batching amortises the weight reads, a key-value cache stops the model recomputing the past, and lower-precision weights buy throughput against a small accuracy loss.
- [Benchmarks and the Traps in Them](https://lightmysky.com/learn/computing/benchmarks-and-the-traps-in-them-mt_o9zLZbkaen): A benchmark is a proxy that becomes a target and then stops measuring what it did. Test data leaks into training sets, baselines are tuned less than the proposed method, and a leaderboard everyone reports against is being overfitted by a whole field at once.
- [Fairness, Accountability and the Limits of a Model](https://lightmysky.com/learn/computing/fairness-accountability-and-the-limits-of-a-model-mt_tTh4WtAyk5): A model trained on past decisions reproduces the pattern in them, including the parts nobody would defend out loud. Several reasonable definitions of fairness cannot all hold at once, so a team has to choose one, say which, and be able to explain a decision to the person it lands on.
- [Interpretability: Probes, Features and Circuits](https://lightmysky.com/learn/computing/interpretability-probes-features-and-circuits-mt_C8POKvRkq6): A trained network is a working artifact that nobody designed in detail. Probes ask whether a property is readable from an activation, feature analysis asks what a direction stands for, and circuit analysis asks which components carry a behaviour. Each answers less than it appears to.
