Interactive Statistical Learning Notebooks
๐ Interactive demonstrations for Advanced Data Analytics, Linear Models, and Quantitative Data Analysis
๐ Python 3.12+ | ๐ Marimo | ๐ Plotly | ๐งฎ WebAssembly
STAT312: Advanced Data Analytics
๐ k-Nearest Neighbours Classification
Learn the fundamentals of k-NN classification through interactive exploration of decision boundaries, parameter effects, and performance evaluation.
- Real-time decision boundary visualisation
- Interactive parameter adjustment
- Bias-variance trade-off exploration
- Custom prediction points
- Performance comparison plots
๐ Launch Demo | ๐ Documentation
๐งฎ Kernel Density Estimation
Explore kernel density estimation techniques through interactive visualisation of density estimates, kernel choices, bandwidth effects, and data distributions.
- Real-time density estimate visualisation
- Interactive bandwidth adjustment
- Multiple kernel function comparison
- Data sampling and generation
- Bias-variance trade-off exploration
๐ Launch Demo | ๐ Documentation
๐ Non-Parametric Regression
Explore kernel methods and non-parametric regression techniques with side-by-side comparisons of k-NN and Nadaraya-Watson approaches.
- Multiple kernel function comparison
- Bandwidth parameter exploration
- Method comparison visualisation
- Kernel weight visualisation
- Train/test performance analysis
๐ Launch Demo | ๐ Documentation
๐ฏ K-Means Clustering
Watch K-Means clustering evolve step-by-step with interactive control over iterations, initialisation, and cluster parameters.
- Step through algorithm iterations with interactive slider
- Visualise cluster formation with convex hulls
- Track centroid movement across iterations
- Monitor convergence with Adjusted Rand Index (ARI)
- Adjust k, sample size, and cluster separation
๐ Launch Demo | ๐ Documentation
STAT321: Linear Models and Time Series Analysis
๐ OLS Geometry Explorer
Explore the geometric interpretation of Ordinary Least Squares through interactive 3D visualisation of the column space, projection, and residuals.
- Interactive 3D visualisation of OLS in observation space
- Edit regressor and response vectors directly
- Orthogonality confirmation with right-angle markers
- Projection and residual-maker matrix inspection
- Real-time summary statistics (ฮฒฬ, ลท, SSR, Rยฒ)
๐ Launch Demo | ๐ Documentation
๐ FWL Theorem Explorer
Step through the Frisch-Waugh-Lovell theorem in 3D and see how partialling out recovers the same coefficients as full OLS.
- Sequential stepping (0โ4) through the partialling-out process
- Two views: displaced path (vector subtraction) and origin directions (orthogonality)
- Colour-coded explanations matching plot vectors
- Fitted value decomposition ลท = PXโ ลท + ฮฒฬโ Xฬโ
- Coefficient comparison: Full OLS vs FWL
๐ Launch Demo | ๐ Documentation
STAT420: Quantitative Data Analysis
๐ณ Classification and Regression Trees (CART)
Explore decision trees and cost-complexity pruning through interactive tree growth and visualisation.
- Control tree growth with maximum depth parameter
- Interactively prune trees using ฮฑ parameter
- Visualise complete tree structure with Mermaid diagrams
- Explore non-linear decision boundaries
- Understand bias-variance trade-offs through pruning
- Zoom in/out on tree diagrams for detailed inspection
๐ Launch Demo | ๐ Documentation