Machine Learning

Definition

Machine learning (ML) is a subfield of artificial intelligence in which systems learn to perform tasks by finding patterns in data, rather than following hand-coded rules. A model is trained on examples and generalises to unseen inputs.


Core Ideas

Learning Paradigms

ParadigmDescriptionExamples
SupervisedLearn a mapping from inputs to labelled outputsRegression, classification
UnsupervisedFind structure in unlabelled dataClustering, dimensionality reduction
ReinforcementLearn actions that maximise a reward signalGame-playing agents, robotics
Self-supervisedGenerate labels from the data itselfLLM pre-training, masked autoencoders

Key Algorithms

Classification

  • Logistic regression, support vector machines (SVM)
  • Decision trees, random forests, gradient boosting (XGBoost, LightGBM)
  • k-nearest neighbours

Regression

  • Linear/polynomial regression, ridge, lasso
  • Neural network regressors

Clustering

  • k-means, DBSCAN, hierarchical clustering

Dimensionality Reduction

  • PCA (linear), t-SNE, UMAP (non-linear)

Model Evaluation

  • Classification: accuracy, precision, recall, F1, ROC/AUC
  • Regression: MAE, MSE, RMSE, R²
  • Validation: train/val/test split, k-fold cross-validation
  • Overfitting signals: high training accuracy, low validation accuracy

Neural Networks

  • Feedforward layers, activation functions (ReLU, sigmoid, tanh)
  • Backpropagation and gradient descent
  • Regularisation: dropout, batch normalisation, L2 weight decay
  • Architectures: CNN (image), RNN/LSTM (sequence), Transformer (attention)

Relationships