Machine Learning and Pattern Classification
Module 1: Bayesian Decision Theory and Density Estimation
1.1 Bayesian Decision Theory Fundamentals
Classification can be framed as a probabilistic task governed by the world's fixed probability distribution . The goal of Bayesian decision theory is to compute posterior class probabilities using prior and class-conditional probabilities via Bayes' Rule:
To minimise the expected error (Bayes Error), the optimal strategy is the Maximum A-Posteriori (MAP) Decision:
If decisions carry differing costs, the framework extends to risk minimisation using a loss function , where is the predicted action and is the true class.
1.2 Density Estimation
To perform MAP decisions, probability density functions (PDFs) are required for continuous variables. A common distribution is the Gaussian (Normal) Distribution:
For - dimensional feature spaces, the Multivariate Gaussian PDF is utilised, governed by a mean vector and a covariance matrix :
The Naïve Bayes Classifier simplifies density estimation by assuming feature independence within a class, thus side-stepping the curse of dimensionality and reducing parameters to . In Naïve Bayes, the MAP classification decision boundary becomes:
Kernel Density Estimation (KDE) provides a non-parametric alternative, computing densities based on local training point distances:
Module 2: Machine Learning Algorithms and Evaluation
2.1 Model Selection and Overfitting
Classifiers are evaluated empirically to avoid overfitting—a scenario where a model memorises training data noise instead of generalisable patterns. Iterative model simplification (pruning) and Cross-Validation are vital techniques to balance the Bias-Variance trade-off. Classifier results are commonly visualised using Confusion Matrices and analysed in ROC Space.
2.2 Core Algorithms
Decision Trees (ID3): ID3 builds trees by splitting training sets using the Information Gain metric to find the most discriminative features. For numeric features, binary tests are evaluated to find the best split point .
Support Vector Machines (SVMs): SVMs perform linear classification by maximising the margin between classes, formulated as an optimisation problem:
For non-linearly separable data, SVMs employ the Kernel Trick to implicitly map inputs to high-dimensional spaces. A classic kernel is the Polynomial Kernel:
2.3 Improving Results
Performance can be optimised via feature construction, grid/random parameter search, and Ensemble Methods. Methods like Stacking train meta-classifiers on the predictions of diverse base learners, while Boosting sequentially trains classifiers on datasets iteratively reweighted based on the errors of the previous models.
Module 3: Neural Networks and Deep Learning
3.1 Artificial Neural Networks (ANNs)
ANNs map inputs to predictions via interconnected units (neurons). A single unit computes a weighted sum (net input) and applies a non-linear activation function :
Training involves minimising a loss function , such as the Sum Squared Error for regression:
Optimization utilizes Gradient Descent:
Error Back-propagation: The gradient of the error is passed backwards through the layers. For an output unit , the error signal is calculated directly. For a hidden unit , it is computed using its successors via the chain rule:
3.2 Deep Architectures and Classification
For binary classification, the Logistic (Sigmoid) function provides pseudo-probabilities mapped to Binary Cross-Entropy loss:
For multi-class (-class) scenarios, networks use the Softmax function alongside Categorical Cross-Entropy:
Deep learning composes multiple non-linear functions . Common network variants include:
- Convolutional Neural Networks (CNNs): Utilise convolution and pooling layers for spatial/temporal data, providing translational invariance.
- Recurrent Neural Networks (RNNs/GRUs): Designed for sequential data. A GRU cell updates its hidden state using gates:
Deep learning is regulated using techniques like Dropout, which randomly zeroes out hidden units during training to prevent co-adaptation, and data augmentation methods (e.g., noise addition, frequency filtering) to expand datasets synthetically.
Module 4: Unsupervised Learning
4.1 Clustering
Unsupervised learning models the inherent descriptive or generative structure of unlabelled datasets . The -means algorithm provides distance-based clustering into disjoint categories, minimising the Mean Quantisation Error (MQE).
4.2 Statistical Data Modelling
Gaussian Mixture Models (GMMs) represent data as probabilistically generated from a weighted mixture of distinct distributions:
Here, represents the mixture coefficient of the -th component. GMMs are trained using the Expectation-Maximisation (E-M) algorithm to find parameters that maximise the likelihood of generating the observed data: