In-depth guides on data analysis, statistics, and machine learning — from first principles to real-world application.
53 articles
Statistics · Featured
Master all clustering algorithms from first principles. Learn distance metrics, hyperparameter tuning, algorithm comparison, and real-world application with SKARI.
K-Means · k=3
K-Means partitions points into k groups, each summarised by its centroid.
Model Lab
Go beyond K-Means. Learn ensemble (consensus) clustering, soft/probabilistic assignment, density and hierarchical methods, and how to evaluate clusters properly.
consensus
How often each pair of points lands in the same cluster across many runs. Dark blocks are the stable clusters the ensemble agrees on.
Model Lab
What linear regression really tells you — simple vs multiple, how to read the output, the four assumptions, and the mistakes that quietly mislead.
R² ≈ 0.8
Regression fits the line that minimises the squared distance to every point.
Model Lab
How the main classifiers differ, which to reach for, the metrics that matter, and why accuracy alone can mislead on imbalanced data.
Correct predictions sit on the diagonal (TP, TN); off-diagonal cells are the errors.
Model Lab
Why models memorize instead of learn — the bias-variance tradeoff, how to spot overfitting, and how Ridge and Lasso regularization fix it.
complexity
Training error keeps falling; validation error turns back up. The gap is overfitting — the sweet spot is the dip.
Model Lab
How a decision tree learns by asking one question at a time — Gini and entropy, why deep trees overfit, and how pruning and forests fix it.
Each split asks one yes/no question, partitioning the data until leaves hold a prediction.
Model Lab
How boosting builds trees in sequence, each correcting the last — why XGBoost and LightGBM dominate tabular data, and the settings that matter.
Each new tree corrects the previous errors — the residual shrinks round after round.
Model Lab
Why a single train/test split can lie, how k-fold cross-validation gives a stable estimate, and the leakage that quietly inflates every score.
The data is split into k folds; each takes a turn as the validation set while the rest train.
Model Lab
The difference between parameters and hyperparameters, how grid and random search find the sweet spot, and why the validation curve keeps you from overfitting the tuning itself.
Training error keeps falling, but validation error bottoms out — the sweet spot before overfitting.
Model Lab
How Principal Component Analysis compresses many correlated columns into a few, what the components mean, why scaling matters, and when to use it.
PCA finds the axes of greatest variance — the long arrow (PC1) captures most of the spread.