CIVE70111 Machine Learning

CIVE70111 Machine Learning

Interactive demonstrations for exploring machine learning algorithms and models, organised by lecture.

Lecture 2: Supervised Learning I

Linear Regression
Linear Regression

Explore how linear regression finds the best line through data points.

Gradient Descent
Gradient Descent

Step through gradient descent one iteration at a time.

Multi-Linear Regression
Multi-Linear Regression

Interactive demonstration of multi-linear regression with real-time feature selection.

Lecture 3: Supervised Learning II

Higher-Order Features
Higher-Order Features

Visualize the bias-variance tradeoff using real bike rental data. Adjust polynomial degree to see underfitting, optimal fit, and overfitting.

Feature Engineering
Feature Engineering

Explore how higher model capacity can cause overfitting in polynomial regression and the effects of L1 and L2 regularisation to mitigate this.

Regularisation
Regularisation

Understand how L1 (Lasso) and L2 (Ridge) regularisation prevent overfitting by penalizing model complexity. Interactive visualization of regularisation effects on polynomial regression.

Regularised GD
Regularised GD

Visualize how L1 and L2 regularization geometrically reshape the loss surface and affect gradient descent trajectories. Watch optimization paths converge to different solutions based on penalty strength.

Perceptrons
Perceptrons

The first neural network algorithm: step through perceptron learning epoch-by-epoch, watching the decision boundary adapt to separate two classes.

1-D Classification
1-D Classification

Interactive logistic regression with adjustable decision boundaries. See how the sigmoid function creates smooth classification boundaries.

2-D Classification
2-D Classification

Multi-class classification with various boundary types (linear, polynomial, radial basis). Experiment with different decision boundary shapes.

Classification Metrics
Classification Metrics

Adjust decision thresholds and explore sensitivity, specificity, precision, accuracy, F1-score, and balanced accuracy. See why accuracy fails with imbalanced data.

Lecture 4: Neural Networks

Neural Networks
Neural Networks

Build and train neural networks with adjustable architecture and parameters. Experiment with different layer sizes and activation functions.

Backpropagation
Backpropagation

Step-by-step visualization of the backpropagation algorithm. Watch how gradients flow backward through the network layers.

ANN Applications
ANN Applications

Train neural networks on real civil engineering datasets. Configure architecture, compare with linear regression, and make predictions in real-world units.

Lecture 5: Computer Vision

Convolution & Pooling
Convolution & Pooling

Interactive exploration of CNN operations with real-time filter visualization. See how convolution and pooling operations transform images.

CNN Architecture
CNN Architecture

Complete MNIST digit classification with real PyTorch backend and epoch-by-epoch training visualization.

Lecture 6: Attention

Bag of Words
Bag of Words

Explore how text can be converted into numerical representations using the bag-of-words approach. See how documents become vectors based on word frequencies.

RNNs
RNNs

Discover how RNNs process sequential data step-by-step. Visualize hidden state evolution and understand the core mechanics of recurrent processing.

LSTMs
LSTMs

Explore Long Short-Term Memory networks with sophisticated gating mechanisms. See how forget, input, cell, and output gates work together to maintain long-term dependencies.

Attention Mechanism
Attention Mechanism

Explore how attention mechanisms work through Q, K, V computations and dot-product attention. Visualize how tokens attend to each other in sequence processing.

Lecture 7: Unsupervised Learning

K-Means Clustering
K-Means Clustering

Interactive clustering demonstration with step-by-step k-means algorithm visualization. Add your own points and watch how centroids move to minimize within-cluster distances.

Hierarchical Clustering
Hierarchical Clustering

Explore agglomerative clustering with interactive dendrogram visualization. Compare different linkage criteria and discover nested cluster structures.

PCA
PCA

Investigate PCA on real civil engineering scenarios. Toggle standardisation, inspect explained variance, and compare feature loadings with saved snapshots.

Lecture 8: Reinforcement Learning

Multi-Armed Bandit
Multi-Armed Bandit

Explore the exploration vs exploitation tradeoff with interactive epsilon-greedy algorithm. Watch an agent learn to balance trying new actions with exploiting known good ones.

Grid World
Grid World

Navigate a 5×5 grid world from start to goal while avoiding obstacles. Learn the fundamentals of state spaces, action spaces, and sequential decision making.

Policy Iteration
Policy Iteration

Watch Policy Iteration find the optimal policy through alternating evaluation and improvement. Visualize value functions and policies converging to the optimal solution.

Lecture 9: Deep RL

Cartpole Control
Cartpole Control

Manual control of CartPole environment. Experience continuous state spaces and unstable dynamics before learning RL algorithms.

Model-Free Control
Model-Free Control

Compare three model-free RL algorithms side-by-side on CartPole. Watch Monte Carlo, SARSA, and Q-learning learn through 4 training checkpoints with Q-table visualizations.