1/81
Comprehensive practice flashcards defining foundational concepts, models, architectures, and algorithms in ST340 Fundamentals of Machine Learning.
Supervised Learning
A machine learning setting where an algorithm is provided with labelled training data comprising input vectors and corresponding output labels, (x(i),y(i))i=1n, with the objective of predicting the labels of unseen future inputs.
Unsupervised Learning
A machine learning setting where an algorithm is provided with unlabelled data, (x(i))i=1n, with the objective of discovering underlying patterns, clustering data points, or performing dimension reduction without target labels.
Empirical Risk (Training Error)
The average loss evaluated across the training dataset Dn, defined for a prediction function f and loss function ℓ as R^(f)=n1∑i=1nℓ(f(x(i)),y(i)).
Curse of Dimensionality
The phenomenon in high-dimensional spaces (d≫1) where geometric intuitions fail; data points become exceedingly sparse, nearest neighbours are located far away, and the vast majority of volume concentrates near the outer boundary.
Underfitting
A condition occurring when a model family is too simple (possessing too few parameters or high bias) to capture the true underlying data-generating relationship, leading to high training error and high generalization error.
Overfitting
A condition occurring when a model is excessively flexible (possessing too many parameters or high variance) and fits the random noise of the training data rather than the true signal, resulting in low training error but poor generalization to new data.
Mean Squared Error (MSE) Decomposition
The identity decomposing the expected squared error of an estimator θ^ for a parameter θ into variance and squared bias: E[(θ^−θ)2]=Var(θ^)+Bias2(θ^).
Bayesian Occam's Razor
The property of Bayesian marginal likelihood maximization wherein overly complex models are automatically penalized because diffuse prior distributions over large parameter spaces place less probability mass on the specific parameter regions that explain the observed data well.
Laplace's Approximation
A method approximating an intractable posterior distribution p(θ∣D) by a multivariate normal distribution Nd(θ^,[H(θ^)]−1) centered at the posterior mode θ^, where H(θ^) is the Hessian matrix of second derivatives of the negative log posterior.
Bayesian Information Criterion (BIC)
A penalized model selection criterion defined for a dataset of size n and a model with parameter dimension dm as ℓBIC(m)=−2logpm(D∣θ^MLE)+dmlog(n), which selects the model with the minimum score.
Akaike Information Criterion (AIC)
A frequentist-derived model selection criterion defined as ℓAIC(m)=−2logpm(D∣θ^MLE)+2dm, penalizing parameter dimension by a constant factor of 2 rather than log(n).
Validation Data
A sequestered dataset, separate from both the training data and the final test data, used to estimate generalization error in order to compare and select among multiple candidate models.
Interpolation Threshold
The model capacity threshold at which a model possesses just enough parameters to fit the training data perfectly (achieving zero training error), which is frequently accompanied by a sharp spike in validation and test error.
Double Descent
The phenomenon observed in overparametrised machine learning models where, after peaking at the interpolation threshold, validation or generalization error decreases a second time as model capacity increases further into the overparametrised regime.
k-Fold Cross-Validation
A model selection procedure where the training set is partitioned into k equally sized subsets, iteratively training on k−1 subsets and evaluating validation error on the remaining subset, then selecting the model that minimizes the average error across all k folds.
Leave-One-Out Cross-Validation (LOOCV)
The special case of k-fold cross-validation where k=n, meaning each model is trained n separate times on n−1 data points and evaluated on the single held-out observation.
Expected Risk
The theoretical expected loss of a prediction function f under the true joint probability distribution p of inputs and outputs: R(f)=E[ℓ(f(X),Y)].
Conditional Risk
The expected loss of predicting a label value z given a specific fixed input location x, defined as r(z∣x)=E[ℓ(z,Y)∣X=x].
Bayes Predictor
A theoretical prediction function f∗:X→Y that achieves the global minimum expected risk by choosing, for each input x, the value f∗(x)∈argminz∈Yr(z∣x).
Bayes Risk
The minimal attainable expected risk under the true distribution p, defined as the risk R(f∗) associated with a Bayes predictor.
Excess Risk
The difference between the expected risk of a given prediction function f and the Bayes risk, expressed as R(f)−R(f∗).
No Free Lunch Theorem
A theorem stating that for binary classification with 0-1 loss over an infinite domain X, for any training sample size n and any learning algorithm A, the worst-case expected excess risk across all possible probability distributions is at least 1/2.
Discriminant Function
A non-probabilistic mapping f:Rd→{1,…,K} that partitions the input space into K decision regions separated by decision boundaries.
One-Hot Encoding
A binary vector representation of a categorical class label y∈{1,…,K} where the kth component is 1 if the instance belongs to class k, and 0 for all other coordinates.
Generative Model
A statistical learning model that fully specifies the joint probability distribution p(X,Y) over both inputs and labels, enabling synthetic data points to be generated.
Discriminative Model
A statistical learning model that specifies only the conditional distribution of labels given the inputs, p(Y∣X), without modelling the distribution of the inputs X.
Standard Logistic Function
The sigmoidal mapping ϕ:R→[0,1] defined by ϕ(a)=1+e−a1, used in logistic regression to map a real-valued linear predictor to a probability.
Cross-Entropy Loss (Negative Log-Likelihood Loss)
The loss function used in logistic regression and neural classification, defined for binary labels y∈{0,1} as ℓ(f(x),y)=−ylogϕ(x⊤w)−(1−y)log(1−ϕ(x⊤w)).
Iteratively Reweighted Least Squares (IRLS)
A numerical optimization method applying the Newton-Raphson algorithm to solve the maximum likelihood estimation problem for logistic regression.
Softmax Function
The normalized exponential vector mapping φ:RK→ΔK defined coordinate-wise by φk(a)=∑l=1Kealeak, serving as a smooth, differentiable multi-class generalization of the logistic function.
Feature Mapping
A collection of basis functions ϕ:X→H that projects data points from the original input space into a higher-dimensional feature space H to allow linear hyperplanes to form non-linear decision boundaries in X.
k-Nearest Neighbours (kNN)
A non-parametric supervised learning algorithm that assigns the label of an input query point by taking a majority vote (for classification) or the arithmetic mean (for regression) of its k closest data points according to a chosen distance metric.
Mahalanobis Distance
A distance metric defined by d(x,z)=(x−z)⊤S−1(x−z), where S is the empirical covariance matrix of the data, weighting individual axes according to their sample variability and correlations.
Maximum Margin Hyperplane (MMH)
The unique separating hyperplane x⋅β+α=0 that classifies linearly separable binary data while maximizing the geometric margin, found by minimizing 21∥β∥2 subject to y(i)(x(i)⋅β+α)≥1.
Margin (SVM)
The total perpendicular distance separating the parallel boundary hyperplanes of opposite classes in a support vector machine, equal to ∥β∥2.
Support Vectors
The specific training observations in a support vector machine that lie directly on or inside the margin boundaries, satisfying y(i)(x(i)⋅β+α)=1−ξi, which uniquely define the optimal separating hyperplane.
Slack Variables (\xi_i)
Non-negative variables ξi≥0 introduced in soft-margin SVM formulations to permit misclassifications and margin violations, adding a linear penalty C∑i=1nξi to the objective function.
Hinge Loss
The continuous piecewise-linear loss function defined as ℓ(z,y)=max(0,1−yz), punishing predictions that fall on the incorrect side of the margin in support vector machines.
Kernel Function
A symmetric function K:X×X→R that directly evaluates the inner product between two points in a feature space, K(x,x′)=⟨ϕ(x),ϕ(x′)⟩, without explicitly computing the feature mapping ϕ.
Kernel Trick
The principle of replacing inner products of explicit feature vectors with evaluations of a kernel function K(x,x′), enabling algorithms to operate in high- or infinite-dimensional feature spaces with computational cost depending only on the number of data points.
Radial Basis Function (RBF) Kernel
A widely used kernel function defined as K(x,x′)=exp(−γ∥x−x′∥2) for γ≥0, which corresponds to an infinite-dimensional feature space.
Gaussian Process (GP)
A collection of random variables (Yx)x∈X such that any finite subcollection has a joint multivariate Gaussian distribution, fully determined by a mean function m(x) and a covariance kernel K(x,x′).
Positive Semidefinite Kernel
A symmetric kernel function K that produces a positive semidefinite Gram matrix Kij=K(x(i),x(j)) satisfying ∑i=1n∑j=1ncicjK(x(i),x(j))≥0 for all finite point collections and real coefficients.
Stationary Kernel
A covariance kernel that depends solely on the difference between two inputs, K(x,x′)=k(x−x′), making its covariance properties translation-invariant across the input domain.
Isotropic Kernel
A stationary covariance kernel that depends solely on the Euclidean distance between two inputs, K(x,x′)=k(∥x−x′∥), ensuring invariance to both translation and rotation.
Matérn Kernel
A family of covariance kernels parameterized by length-scale ℓ and order ν, where sample paths of the resulting Gaussian process are precisely ⌈ν⌉−1 times differentiable.
Ornstein–Uhlenbeck Process
The Gaussian process defined on R by a Matérn kernel with ν=1/2, K(x,x′)=exp(−∥x−x′∥/ℓ), which exhibits the Markov property but produces trajectories that are nowhere differentiable.
Automatic Relevance Determination (ARD) Kernel
A generalization of the squared exponential kernel that assigns a distinct length-scale parameter ℓj to each input coordinate, allowing the relative predictive importance of each covariate to be inferred from data.
Kriging
A Bayesian non-parametric regression method that models an unknown real-valued function using a Gaussian process prior combined with a Gaussian observation likelihood, yielding an analytical Gaussian process posterior.
Perceptron
An early single-layer artificial neural network architecture proposed by Frank Rosenblatt in 1957 that uses fixed basis functions and a step threshold activation function to perform non-probabilistic binary classification.
Perceptron Criterion
The objective function minimized in perceptron training, defined as ℓn(w;Dn)=−∑i∈M(w)w⋅ϕ(x(i))y(i), where M(w) denotes the set of data points currently misclassified by weight vector w.
Universal Approximation Theorem for Continuous Functions
A theorem establishing that any continuous function on a compact subset of Rd can be approximated uniformly by a two-layer feedforward network equipped with linear output units and Heaviside or sigmoidal hidden activations.
Kolmogorov–Arnold Representation Theorem
A theorem stating that every continuous function on [0,1]d can be written exactly as a finite superposition and composition of continuous univariate functions and addition operations: fk(x)=∑j=12d+1Φk(∑i=1dλigj(xi)).
Gradient Descent (GD)
A first-order optimization algorithm that iteratively updates a parameter vector in the direction of steepest loss decrease evaluated across the full training dataset: w(t+1)=w(t)−η∇ℓn(w(t);Dn).
Stochastic Gradient Descent (SGD)
An on-line variant of gradient descent that updates parameters using the gradient evaluated on a single data point (or mini-batch) at each iteration: w(t+1)=w(t)−η∇ℓ(w(t);x(i),y(i)).
Backpropagation
A dynamic programming implementation of the multivariable chain rule that propagates errors backward from the output layer to compute the partial derivatives of the loss with respect to all network weights in linear time.
Activation Function Saturation
The condition where an activation function's derivative becomes near zero (∣g′(a)∣≈0) across extreme input values, preventing gradients from flowing through the network and halting learning via gradient descent.
Momentum (SGD)
A technique in gradient descent that incorporates an exponentially decaying velocity vector of previous weight updates, v(t+1)=αv(t)−η∇ℓ, helping the algorithm push through flat plateaus and dampening oscillations.
Batch Normalization
A training technique that standardizes the inputs to hidden units across each mini-batch to have zero mean and unit variance, followed by a learnable affine transformation with scale γ and shift β.
Residual Connection (Skip Connection)
A network connection that adds the activation of an earlier layer directly to the output of a later layer, z(i+k)=z(i)+G(z(i)), creating shortcut pathways for gradients to backpropagate directly without vanishing.
Vanishing Gradient Problem
An issue during backpropagation in deep neural networks where error gradients shrink exponentially as they propagate backward through many layers with small derivative values, preventing earlier layers from updating effectively.
Regularization
Any modification made to a machine learning algorithm or objective function designed specifically to reduce generalization error on unseen data without necessarily reducing training error.
Weight Decay (L2 Regularization)
A regularization method that adds an L2 norm penalty 2λ∥w∥22 to the objective function, shrinking weights toward zero at each gradient step by a multiplicative factor of (1−ηλ).
Early Stopping
A regularization technique where iterative training is halted once validation error fails to improve after a specified patience threshold of iterations, preventing the network from overfitting to the training set.
Weight Sharing
A regularization approach that restricts subsets of network parameters, either by forcing them to take identical values (hard weight sharing) or by tying them to a common prior distribution (soft weight sharing).
Convolutional Neural Network (CNN)
A neural network architecture specialized for grid-structured data that replaces general dense matrix multiplication with discrete convolution (or cross-correlation) operations, enforcing sparse local connectivity and translation-invariant parameter sharing.
Toeplitz Matrix
A structured matrix with constant values along each descending diagonal from left to right, which corresponds to the linear operator representation of a discrete convolution.
Pooling
A non-linear spatial downsampling operation in CNNs (such as max pooling or average pooling) that summarizes local neighborhoods of neurons, reducing feature map dimensions and providing local translational invariance.
Transformer
A neural network architecture designed for sequence data that processes tokens in parallel using stacked multi-head self-attention mechanisms and feedforward layers, eschewing recurrence and convolution.
Self-Attention
A mechanism mapping an input sequence of tokens X∈Rd×M to a transformed sequence by computing attention weights from dot products of token queries qm=Uqxm and keys km=Ukxm via the softmax function.
Multi-Head Self-Attention (MHSA)
An attention architecture that applies H distinct self-attention mechanisms in parallel using separate projection matrices, linearly combining their outputs through projection matrix Vh to capture diverse contextual dependencies simultaneously.
Masked Self-Attention
A constrained variant of self-attention where the attention matrix A is forced to be upper triangular (Am′m=0 for m′>m), ensuring that each token attends only to preceding tokens in autoregressive language models.
Singular Value Decomposition (SVD)
The matrix factorization of any real m×n matrix A into A=UΣV⊤, where U and V are orthogonal matrices of left- and right-singular vectors, and Σ contains the ordered, non-negative singular values σi.
Frobenius Norm
A matrix norm defined for an m×n matrix M as the square root of the sum of squared elements, travel∥M∥F=∑i=1m∑j=1nmij2=tr(M⊤M), which is invariant under orthogonal rotations.
Schmidt Low-Rank Matrix Approximation Theorem
A theorem stating that the optimal rank-k approximation of a matrix A under both the Frobenius and spectral norms is given by its truncated SVD, A~k=∑i=1kσiuivi⊤.
Spectral Norm
The induced operator norm of a matrix defined by travel∥M∥2=supx=0∥x∥2∥Mx∥2, which evaluates exactly to the largest singular value σ1 of M.
Principal Component Analysis (PCA)
An unsupervised orthogonal linear transformation that projects centered data onto an orthonormal basis composed of the eigenvectors of the sample covariance matrix, arranged in descending order of explained variance.
Coordinate Descent
An iterative optimization algorithm that minimizes a multivariate objective function by successively solving exact one-dimensional minimization problems along single coordinate directions while keeping all other variables fixed.
K-Means Algorithm
A centroid-based clustering algorithm that uses coordinate descent to minimize the sum of squared Euclidean distances between observations and their assigned centroids, alternating between assigning points to the closest centroid and updating centroids to cluster means.
Gaussian Mixture Model (GMM)
A probabilistic latent variable model expressing the distribution of an observation as a convex combination of K Gaussian component distributions: p(x)=∑k=1KwkN(x;μk,Σk).
Expectation-Maximization (EM) Algorithm
An iterative coordinate ascent algorithm for finding maximum likelihood parameter estimates in models with latent variables, alternating between calculating posterior distributions of latent assignments (E-step) and maximizing expected complete-data log-likelihood (M-step).
Responsibility (\gamma_{ik})
In a mixture model, the posterior probability that observation x(i) was generated by mixture component k, computed in the E-step as γik=∑j=1Kwjp(x(i)∣ψj)wkp(x(i)∣ψk).