Stage 1 of 4
Classic machine learning
From a straight line to a whole forest: linear and logistic regression, decision trees, k-means, SVMs, PCA, k-nearest neighbours, Gaussian discriminant analysis, random forests and gradient boosting. Every lab computes for real in your browser, checked against NumPy and scikit-learn.
- algorithms
- 10
- in every lab
- 2D + 3D
- articles for every lab
- EN / 中文
Live · computing in your browser
Algorithms in Classic machine learning
In the recommended learning order. Hover a card to replay how that algorithm computes.
- 01
Linear regression
Least-squares lines and planes: QR closed form and gradient descent; drag any point and it recomputes.
Open the lab - 02
Logistic regression
A probabilistic binary classifier: sigmoid, cross-entropy, gradient descent and Newton's method, threshold, confusion matrix and ROC.
Open the lab - 03
Decision tree
CART grown one split at a time: Gini, entropy and MSE, the split search, tree diagram and cost-complexity pruning.
Open the lab - 04
K-means clustering
Lloyd's algorithm step by step: k-means++ seeding, Voronoi cells, elbow and silhouette, 100,000 points on the GPU.
Open the lab - 05
Support vector machine
Soft-margin SVM solved by SMO one α-pair at a time: margins, support vectors, kernels and the explicit feature map.
Open the lab - 06
Principal component analysis
Principal components by power iteration: axes, projection, explained variance and reconstruction, in 3D and on the iris data.
Open the lab - 07
k nearest neighbours
k nearest neighbours: decision regions as k changes, distance balls, accuracy against k, a 20,000-point grid on the GPU.
Open the lab - 08
Gaussian discriminant analysis and naive Bayes
Gaussian naive Bayes, LDA and QDA learned one sample at a time: ellipses, posteriors, boundaries and probability hills.
Open the lab - 09
Random forest
A random forest grown one tree at a time: bootstrap samples, random features, out-of-bag error and the averaged vote.
Open the lab - 10
Gradient boosting
Gradient boosting stage by stage: each small tree fits the residuals and the fit sharpens, in 1D and as a 3D surface.
Open the lab