Glossary
152 core machine-learning terms in plain language, each with an example and links to the lessons that teach it. These are the terms underlined in lesson text; hover one there for a quick definition.
Linear Algebra & Calculus
- Chain rulechain rule of calculus
The derivative of a composition is the product of the derivatives of its parts, evaluated along the way.
- Convexityconvex function · convex loss
A function is convex if it is bowl-shaped: any local minimum is the global minimum.
- Cosine similaritycosine distance
Scores how closely two vectors point the same way, from −1 (opposite) to 1 (identical direction), ignoring length.
- Covariance matrixcovariance matrices
A square matrix holding every feature's variance on its diagonal and every pair's covariance off it.
- Dot productinner product · scalar product
Multiplies two vectors entry by entry and sums the results, giving one number that grows when they point the same way.
- Eigenvectoreigenvectors · eigenvalue · eigenvalues
A direction that a matrix only stretches or flips, never rotates; the stretch factor is its eigenvalue.
- Gradientgradients · gradient vector
The vector of all partial derivatives of a function; it points in the direction of steepest increase.
- HessianHessian matrix
The matrix of second derivatives of a function, describing how its slope bends: its curvature.
- JacobianJacobian matrix · Jacobian determinant
The matrix of all partial derivatives of a vector-valued function: how each output changes with each input.
- Matrixmatrices · weight matrix
A rectangular grid of numbers that can store a dataset or describe a linear transformation of vectors.
- Matrix multiplicationmatrix product · matmul
Combines an m×n and an n×p matrix into an m×p matrix whose entries are dot products of rows with columns.
- NormL2 norm · Euclidean norm · L1 norm
A measure of a vector's size; the usual L2 norm is its straight-line length.
- Partial derivativepartial derivatives · ∂f/∂x
How fast a multi-input function changes when you nudge one input and hold all the others fixed.
- Singular value decompositionSVD · singular values · singular vectors
Factors any matrix into a rotation, a scaling along perpendicular axes, and another rotation.
- Tensortensors · n-dimensional array
A multi-dimensional array of numbers: a scalar, vector and matrix are tensors with 0, 1 and 2 axes.
- Vectorfeature vector · column vector
An ordered list of numbers, read either as a point in space or as an arrow with a direction and length.
Probability & Information
- Bayes' theoremBayes' rule · Bayes rule · Bayes theorem
A rule for updating a belief with evidence: the posterior is the likelihood times the prior, normalized.
- Cross-entropycross-entropy loss · log loss · categorical cross-entropy
The average surprise of the true outcomes under a model's predicted probabilities; the standard classification loss.
- EntropyShannon entropy · H(X)
The average surprise of a distribution, in bits: how uncertain you are about its outcome.
- Expected valueexpectation · mean · E[X]
The long-run average of a random quantity: each possible value weighted by its probability.
- KL divergenceKullback–Leibler divergence · Kullback-Leibler divergence · relative entropy
The extra bits wasted by using distribution q in place of the true distribution p; zero only when they match.
- Maximum likelihood estimationMLE · maximum likelihood · log-likelihood
Picks the parameters that make the observed data most probable under the model.
- Monte Carlo samplingMonte Carlo · Monte Carlo estimation · Monte Carlo methods
Estimating a quantity, usually an expected value, by averaging the results of many random samples.
- Normal distributionGaussian distribution · Gaussian · bell curve
The bell-shaped distribution set by a mean μ (its center) and a standard deviation σ (its width).
- Probability distributiondistribution · probability mass function · probability density function
A description of how likely each possible value of a random quantity is, with the probabilities summing to 1.
- VarianceVar(X) · standard deviation · σ²
How spread out a random quantity is: the average squared distance from its mean.
Optimization & Training
- AdamAdam optimizer · AdamW · Adaptive Moment Estimation
The default deep-learning optimizer: momentum plus a per-parameter step size scaled by recent gradient magnitudes.
- Backpropagationbackprop · backward pass · reverse-mode differentiation
The algorithm that computes every weight's gradient by applying the chain rule backward from the loss through the network.
- Batch sizemini-batch · mini-batch size
The number of training examples used to compute each gradient update.
- Epochepochs · training epoch
One complete pass of the training algorithm over every example in the training set.
- Gradient clippingclipping gradients · clip gradients · gradient norm clipping
Caps the size of the gradient before each update so one huge gradient cannot wreck training.
- Gradient descentGD
Minimizes a loss by repeatedly stepping parameters a small amount against the gradient, the direction of steepest increase.
- Hyperparameterhyperparameters · hyper-parameter
A setting chosen before training, such as the learning rate or batch size, rather than learned from the data.
- Learning ratestep size · η · LR
The multiplier η that sets how far each optimizer step moves the parameters; usually the most important hyperparameter.
- Learning rate schedulelearning rate scheduling · learning rate decay · learning rate warmup
A rule that changes the learning rate during training, typically warming up, then decaying so the model settles.
- Local minimumlocal minima · local optimum · global minimum
A point lower than everything around it but not necessarily the lowest point overall.
- Loss functioncost function · objective function · objective
A function that scores how wrong a model's predictions are; training adjusts the parameters to make it small.
- MomentumSGD with momentum · heavy-ball momentum · Nesterov momentum
An optimizer trick that keeps a running velocity of past gradients, speeding up consistent directions and damping zig-zags.
- Stochastic gradient descentSGD · mini-batch gradient descent · mini-batch SGD
Gradient descent that estimates the gradient from one example or a small random batch instead of the whole dataset.
- Vanishing gradientvanishing gradients · exploding gradients · vanishing gradient problem
Gradients shrinking toward zero as they pass back through many layers or time steps, so early layers barely learn.
- Weight initializationXavier initialization · Glorot initialization · He initialization
How a network's weights are set before training; the right random scale keeps signals from vanishing or exploding with depth.
- Weight space programmingEmergingweight-space manipulation · model merging · task arithmetic
Changing a trained network by operating on its weights directly (adding, averaging, editing or generating them) instead of only training it on more data.
Neural Architectures
- Activation functionnonlinearity
The nonlinear function applied to each neuron’s weighted sum, which lets a network model more than straight-line relationships.
- Attentionattention mechanism · scaled dot-product attention
A mechanism that lets a model build each output as a weighted mix of inputs, with weights based on relevance.
- AutoencoderAE · denoising autoencoder
A network trained to reproduce its input after squeezing it through a narrow bottleneck, learning a compact code.
- Convolutional neural networkCNN · ConvNet
A neural network that slides small learned filters across an image (or other grid) to detect local patterns.
- Embeddingembedding vector · embedding layer
A learned dense vector that represents a discrete item, such as a token or user, so similar items get nearby vectors.
- Encoder–decoderencoder-decoder · seq2seq · sequence-to-sequence
An architecture in which one network encodes the input into a representation and a second network decodes it into the output.
- GRUgated recurrent unit
A simpler gated recurrent cell than the LSTM, using an update gate and a reset gate and no separate cell state.
- LSTMlong short-term memory
A recurrent network cell with forget, input and output gates that decide what to keep in a separate long-term memory.
- Multi-head attentionMHA · attention heads
Runs several attention operations in parallel on smaller projections, so different heads can track different relationships.
- Multilayer perceptronMLP · feedforward neural network · multi-layer perceptron
A neural network of stacked fully connected layers, each a linear map followed by a nonlinear activation.
- Perceptron
A single artificial neuron: a weighted sum of inputs plus a bias, passed through a step function to output 0 or 1.
- Poolingmax pooling · average pooling
A downsampling step that summarizes each small patch of a feature map by its maximum or average.
- Positional encodingpositional embedding · position embedding
A vector added to each token embedding that tells an attention model where in the sequence the token sits.
- Recurrent neural networkRNN
A neural network that reads a sequence one step at a time, carrying a hidden state that summarizes what it has seen.
- ReLUrectified linear unit · Leaky ReLU
An activation function that passes positive values through unchanged and replaces negative values with zero.
- Residual connectionskip connection · shortcut connection
A shortcut that adds a block’s input to its output, so the block only has to learn a correction.
- Self-attentionintra-attention
Attention in which every token of a sequence attends to every token of that same sequence, including itself.
- Sigmoidlogistic function · sigmoid function
An S-shaped function that squashes any real number into the range 0 to 1, often read as a probability.
- Softmaxsoftmax function
Turns a vector of raw scores (logits) into probabilities that are all positive and sum to 1.
- State space modelSSM · Mamba · state-space model
A sequence model that compresses the past into a fixed-size state updated by a linear recurrence, running in linear time.
- Transformer
A neural architecture built from stacked self-attention and feed-forward layers, the basis of modern language models.
- Vision TransformerViT
A Transformer applied to images by cutting each image into fixed-size patches and treating the patches as tokens.
Regularization & Generalization
- Batch normalizationbatch norm · BatchNorm · BN
Normalizes each feature across the current mini-batch to zero mean and unit variance, then rescales it with learned parameters.
- Bias-variance tradeoffbias–variance tradeoff · bias-variance trade-off · bias-variance decomposition
Simpler models make systematic errors (bias) while flexible models are sensitive to the particular training sample (variance).
- Data augmentation
Creates extra training examples by applying label-preserving changes, such as flips, crops or rotations, to existing data.
- Dropout
During training, randomly zeroes a fraction of neurons on every step so the network cannot rely on any single unit.
- Early stopping
Stops training when validation performance stops improving and keeps the weights from the best epoch.
- Elastic netElastic Net · elastic-net regularization
Combines L1 and L2 penalties, getting sparse weights like lasso while staying stable with correlated features like ridge.
- Generalizationgeneralisation · generalization error · generalization gap
How well a trained model performs on new data drawn from the same distribution, not just the examples it was trained on.
- L1 regularizationL1 · lasso · lasso regression
Adds the sum of absolute weight values to the loss, which pushes many weights to exactly zero.
- L2 regularizationL2 · ridge · ridge regression
Adds the sum of squared weights to the loss, shrinking all weights toward zero without making them exactly zero.
- Layer normalizationlayer norm · LayerNorm · layer normalisation
Normalizes the features of each individual example to zero mean and unit variance, independent of the batch.
- Overfittingoverfit · over-fitting
When a model fits the training data, noise included, so closely that it performs worse on new data.
- Regularizationregularisation · regularizer
Any technique that discourages a model from fitting noise in the training data so it generalizes better to new data.
- Underfittingunderfit · under-fitting
When a model is too simple to capture the real pattern, so it does poorly even on its training data.
Evaluation & Validation
- Accuracy
The fraction of all predictions that are correct; it can be misleading when one class is much more common than the others.
- Confusion matrix
A table counting predictions against true labels, showing true and false positives and negatives for each class.
- Cross-validationk-fold cross-validation · k-fold · k-fold CV
Estimates performance by splitting the data into k folds, training on k − 1 of them and validating on the remaining one, k times.
- Data leakagetarget leakage · label leakage · train-test contamination
When information that would not be available at prediction time, often from the test set, sneaks into training and inflates scores.
- F1 scoreF1 · F-score · F-measure
The harmonic mean of precision and recall, high only when both are high.
- Mean squared errorMSE · L2 loss · squared error
The average of the squared differences between predictions and true values, the standard loss for regression.
- Precisionpositive predictive value
Of everything the model labeled positive, the fraction that really is positive.
- Recallsensitivity · true positive rate · TPR
Of all the truly positive cases, the fraction the model managed to find.
- ROC curve and AUCROC curve · ROC-AUC · AUC
The ROC curve plots true positive rate against false positive rate across all thresholds; AUC is the area under it.
- Train/validation/test splittraining set · validation set · test set
Dividing data into a training set to fit the model, a validation set to tune it, and a test set used once for the final score.
Classical ML
- Baggingbootstrap aggregating · bootstrap aggregation
Trains many copies of a model on random resamples of the data drawn with replacement and averages their predictions.
- Boostinggradient boosting · AdaBoost · XGBoost
Builds an ensemble sequentially, with each new weak model focusing on the mistakes of the models before it.
- Clusteringcluster analysis
Grouping unlabeled data points so that points in the same group are more similar to each other than to points in other groups.
- DBSCANdensity-based clustering · density-based spatial clustering of applications with noise
A clustering algorithm that grows clusters from dense regions of points and labels isolated points as noise.
- Decision treedecision trees · CART · classification tree
A model that predicts by asking a sequence of yes/no questions about the features, following branches down to a leaf.
- Ensemble learningensemble methods · ensembling · model ensemble
Combining the predictions of several models so their individual errors partly cancel out.
- Hierarchical clusteringagglomerative clustering · divisive clustering · dendrogram
Builds a tree of nested clusters by repeatedly merging (or splitting) groups, so you can choose the number of clusters afterward.
- k-meansk-means clustering · K-means · k-means++
Partitions data into k clusters by repeatedly assigning points to the nearest centroid and moving each centroid to its points’ mean.
- k-nearest neighborsk-NN · KNN · kNN
Predicts the label of a new point from the k most similar training points, by majority vote or by averaging.
- Kernel trickkernel methods · kernel function · RBF kernel
Lets a linear algorithm learn non-linear boundaries by computing dot products in a higher-dimensional feature space without building that space.
- Linear regressionordinary least squares · OLS · least squares regression
Predicts a number as a weighted sum of the input features plus a bias, choosing the weights that minimize squared error.
- Logistic regressionlogit model · softmax regression
A classifier that passes a weighted sum of the features through a sigmoid to output the probability of the positive class.
- Naive BayesNaïve Bayes · naive Bayes classifier · multinomial naive Bayes
A fast probabilistic classifier that applies Bayes’ theorem while assuming features are independent given the class.
- Principal component analysisPCA · principal components
Reduces dimensionality by projecting data onto the few orthogonal directions along which it varies most.
- Random forestrandom forests · random decision forest
An ensemble of decision trees, each trained on a bootstrap sample with random feature subsets, whose predictions are averaged or voted.
- Supervised learning
Learning a mapping from inputs to outputs using examples that come with the correct answer (labels).
- Support vector machineSVM · SVMs · support vector machines
A classifier that picks the boundary separating the classes with the widest possible margin to the nearest points.
- Unsupervised learning
Finding structure such as groups or low-dimensional patterns in data that has no labels.
Language & LLMs
- Bag-of-wordsBoW · bag of words
Represents a document as a vector of word counts over a vocabulary, ignoring word order entirely.
- Beam search
A decoding method that keeps the b most probable partial sequences at each step instead of only the single best token.
- BERTBidirectional Encoder Representations from Transformers
An encoder-only transformer pretrained to fill in masked words using context from both sides.
- Chain-of-thoughtCoT · chain-of-thought prompting · chain of thought
Prompting a language model to write out intermediate reasoning steps before giving its final answer.
- Context windowcontext length
The maximum number of tokens a language model can take into account at once, prompt and output combined.
- Contextual embeddingcontextualized embedding · ELMo
A word vector computed from the whole sentence, so the same word gets different vectors in different contexts.
- Fine-tuningfinetuning · fine-tune
Continuing to train a pretrained model on a smaller task-specific dataset so it adapts to that task.
- Hallucinationconfabulation
When a generative model states fluent, confident content that is false or unsupported by its sources.
- KV cachekey-value cache · KV-cache · KV caching
Stored attention keys and values for past tokens, so generating each new token does not recompute them.
- Language modelLM · n-gram language model
A model that assigns probabilities to sequences of tokens, usually by predicting the next token from the ones before it.
- Large language modelLLM · LLMs
A transformer language model with billions of parameters, pretrained on huge text corpora to predict the next token.
- Named entity recognitionNER · named-entity recognition · entity extraction
Finding spans of text that name real-world things and labeling each as a type such as person, organization or location.
- PerplexityPPL
The exponential of a language model's average per-token cross-entropy on held-out text; lower is better.
- Quantizationmodel quantization · INT8 · INT4
Storing a model's weights (and sometimes activations) in fewer bits, such as 8 or 4, to cut memory and speed up inference.
- Sampling temperaturetemperature sampling · softmax temperature
A setting that divides logits before softmax: below 1 sharpens the next-token distribution, above 1 flattens it.
- TF-IDFterm frequency–inverse document frequency · tf-idf · TFIDF
Weights a word by how often it appears in a document, discounted by how many documents in the corpus contain it.
- Tokenizationtokenizer · subword tokenization · BPE
Splitting raw text into tokens (words, subword pieces or characters) that a model maps to integer IDs.
- Transfer learning
Reusing what a model learned on one large task or dataset as the starting point for a different, usually smaller, task.
- Word embeddingword vectors · word2vec · GloVe
A dense vector for each word, learned so that words used in similar contexts end up close together.
Generative Models
- Autoregressive modelAR model
A model that generates a sequence one element at a time, each predicted from all the elements before it.
- Contrastive learningInfoNCE · contrastive loss
Learns representations by pulling embeddings of matching pairs together and pushing non-matching pairs apart.
- Diffusion modeldenoising diffusion model · DDPM
A generative model that learns to reverse a gradual noising process, creating data by denoising pure noise step by step.
- Generative adversarial networkGAN
Two networks trained against each other: a generator makes fake samples and a discriminator tries to tell them from real data.
- Generative model
A model that learns the distribution of its training data so it can produce new, similar examples.
- Latent spacelatent representation · latent code
The compressed space of hidden codes a model learns, in which similar inputs map to nearby points.
- Normalizing flowflow-based model
A generative model that turns a simple distribution into a complex one through a chain of invertible transformations.
- Variational autoencoderVAE
An autoencoder whose encoder outputs a probability distribution over latent codes, so new data can be generated by sampling.
Reinforcement Learning
- Actor-criticactor-critic methods · A2C · A3C
Combines a policy (the actor) that picks actions with a value estimate (the critic) that judges them, giving lower-variance updates.
- Bellman equationBellman equations · Bellman optimality equation · Bellman backup
A recursive identity: the value of a state equals the immediate reward plus the discounted value of the states that follow.
- Deep Q-networkDQN · deep Q-learning · deep Q-networks
Q-learning with a neural network approximating the Q-values, stabilized by experience replay and a periodically updated target network.
- Exploration–exploitation tradeoffexploration vs. exploitation · explore-exploit · ε-greedy
The dilemma between trying new actions to learn more and choosing the action that currently looks best.
- Markov decision processMDP · MDPs
The standard mathematical model of a reinforcement learning problem: states, actions, transition probabilities, rewards and a discount factor.
- Policy (RL)policy · π(a|s) · policy network
In reinforcement learning, the agent’s rule for choosing an action in each state, either fixed or as a probability distribution.
- Policy gradientpolicy gradient methods · REINFORCE · PPO
RL methods that directly adjust policy parameters by gradient ascent to make high-return actions more likely.
- Q-learningtabular Q-learning
A model-free algorithm that learns the value of each action in each state from experience, nudging estimates toward reward plus the best next value.
- Reinforcement learningRL · deep reinforcement learning · deep RL
Learning to make a sequence of decisions by trial and error, guided by rewards from an environment rather than labeled answers.
- Value functionstate-value function · action-value function · V(s)
The expected total future reward from a state, or from taking a given action in a state, when following a particular policy.
Retrieval, RAG & Agents
- AI agentLLM agent · autonomous agent
An LLM-driven system that pursues a goal by repeatedly reasoning, calling tools and observing results until done.
- BM25Okapi BM25
A keyword ranking function that scores documents by query-term frequency, term rarity and document length.
- Chunkingtext chunking · document chunking
Splitting documents into smaller passages before embedding them, so retrieval can return just the relevant piece.
- Hybrid searchhybrid retrieval · reciprocal rank fusion · RRF
Combining keyword (sparse) and embedding (dense) retrieval so results catch both exact terms and paraphrases.
- Knowledge graphKG · GraphRAG · graph RAG
A network of entities connected by labeled relationships, stored as (subject, predicate, object) triples.
- Rerankingre-ranking · reranker · cross-encoder reranking
A second retrieval stage that reorders a shortlist of candidates with a slower but more accurate relevance model.
- Retrieval-augmented generationRAG · retrieval augmented generation
Answering with a language model after first retrieving relevant passages from an external corpus and adding them to the prompt.
- Semantic searchdense retrieval · vector search
Search that ranks documents by closeness in meaning, comparing embeddings rather than matching exact words.
- Tool callingfunction calling · tool use
Letting a language model request a function call by emitting structured arguments that application code then executes.
- Vector databasevector store · vector DB · vector index
A database built to store embedding vectors and quickly find the ones nearest to a query vector.