Logistic regression classifies examples by combining features into a score and mapping it to a class probability. Multiclass variants estimate probabilities across several classes.
What the demonstration does: Computes probabilities from a small fitted logistic model; moving the boundary changes its offset, not a new training run.
References: scikit-learn: Logistic regression
Predict a category by following a sequence of feature questions. Training chooses splits that make the labels in each branch more consistent.
What the demonstration does: Traces splits and leaf class distributions in a small example tree. It is not a validation study.
References: scikit-learn: Decision trees and minimal cost-complexity pruning
Compare how likely the features are under each class, using the simplifying assumption that features are conditionally independent given that class.
What the demonstration does: Combines class priors and feature likelihoods in a toy example; independence is an assumption, not an observed fact.
References: scikit-learn: Naive Bayes variants
Seek a class boundary with a wide margin while allowing controlled violations. A kernel can represent nonlinear similarities. This entry uses SVC classification, not the separate SVR task.
What the demonstration does: Shows a small margin/boundary example. Changing visual settings does not establish a full kernel SVC optimization.
References: scikit-learn: Support vector machines
Predict a class from the most similar stored labeled examples. Nearby examples vote, optionally giving closer neighbors more weight.
What the demonstration does: Computes distances and a neighbor vote on stored example points; this is prediction, not iterative training.
References: scikit-learn: Nearest neighbors
Train many classification trees on varied samples and feature subsets, then combine their class votes. Diversity between trees helps reduce the instability of a single tree.
What the demonstration does: Combines example tree predictions. The vote illustrates ensembling, not calibrated confidence or a performance benchmark.
References: scikit-learn: Random forests; Breiman: Random Forests (2001)
An optimized gradient-boosted-tree system. This lesson uses binary logistic classification: trees sequentially improve a class score with regularized leaf outputs. The library also supports other objectives, but this entry demonstrates classification only.
What the demonstration does: Computes a small sequence of logistic correction trees; it is not the full XGBoost library or a held-out evaluation.
References: XGBoost: Parameter documentation; Chen & Guestrin: XGBoost (2016)
Predict a number as a weighted sum of input features plus an intercept. Fitting chooses coefficients that reduce prediction errors; ridge and lasso add regularization.
What the demonstration does: Computes a line and squared errors as its slope changes. A manually adjusted line is not a new least-squares fit.
References: scikit-learn: Ordinary least squares and regularized linear models
Expand numeric inputs into powers, then fit a linear combination of those features.
What the demonstration does: Fits polynomial coefficients to nine synthetic observations with degree 1–5; training error alone cannot select the degree.
References: Polynomial features; Ordinary least squares
Penalize coefficient size while fitting numeric targets. Ridge uses L2; Lasso uses L1.
What the demonstration does: Fits small standardized Ridge/Lasso examples and compares shrinkage. Zero coefficients do not prove causal irrelevance.
References: Ridge regression; Lasso
Predict a number by splitting the feature space into regions. A squared-error tree returns the average of the training targets in the leaf reached by the input.
What the demonstration does: Splits a small numerical example and displays leaf averages; no generalization claim follows from the fit.
References: scikit-learn: Regression trees and pruning
Discover groups in numerical data by fitting k centers to the input features. Each point joins its nearest center, and each center moves to the mean of its assigned points.
What the demonstration does: Reassigns example points to centers and updates their means. Results depend on initialization and the chosen cluster count.
References: scikit-learn: K-means
Build a tree of nested groups. In the agglomerative version, each point starts alone and the closest groups are merged step by step.
What the demonstration does: Shows successive single-linkage merges of example points; the merge map is not a dendrogram or a validated taxonomy.
References: scikit-learn: Hierarchical clustering
Grow clusters through density-connected core points and leave sparse observations as noise.
What the demonstration does: Computes neighborhoods, core points, border points and noise on a small synthetic dataset.
References: DBSCAN
Map numerical examples onto a small grid of prototype vectors. Nearby grid positions are encouraged to respond to similar examples, making a high-dimensional dataset easier to explore.
What the demonstration does: Computes a neighborhood update-strength illustration on a small grid; it does not train a complete self-organizing map.
References: Kohonen: Self-Organized Formation of Topologically Correct Feature Maps (1982)
First compress records into many small pre-clusters, then group those summaries hierarchically. Implementations marketed as Two-Step often support mixed numerical and categorical data.
What the demonstration does: Illustrates pre-clustering followed by grouping. It is not a full mixed-data Two-Step implementation with automatic model selection.
References: Chiu et al.: A Robust and Scalable Clustering Algorithm for Mixed Type Attributes (2001); scikit-learn: BIRCH (related pre-clustering method)
Find items that often appear in the same basket. Apriori builds larger frequent itemsets from smaller ones: if a set is frequent, each of its subsets must also be frequent.
What the demonstration does: Counts itemsets and support in example transactions; frequent co-occurrence is not causation.
References: Agrawal & Srikant: Fast Algorithms for Mining Association Rules (1994)
Compress baskets into a tree with shared prefixes, then mine frequent itemsets by following conditional paths through the tree.
What the demonstration does: Builds a shared-prefix FP tree from example transactions. It stops before conditional-pattern mining.
References: Han, Pei & Yin: Mining Frequent Patterns without Candidate Generation (2000)
Project numerical features onto a smaller set of perpendicular directions. PCA selects the directions that retain the most input variance, an unsupervised objective. Evaluate separately whether those directions help predict the target.
What the demonstration does: Computes a small linear projection and retained variance; variance does not measure downstream prediction accuracy.
References: scikit-learn: PCA
Predict future numerical values using time-ordered observations. Several model families tackle this task. ARIMA, for example, combines autoregression, differencing, and past error terms.
What the demonstration does: Computes a small autoregressive forecasting example; it is not a complete ARIMA or seasonal forecasting pipeline.
References: Hyndman & Athanasopoulos: Forecasting—ARIMA models; scikit-learn: Time-series split
Find ordered sequences that recur across many histories. “A then B” and “B then A” count as separate patterns. The result describes recurring sequences in past records; forecasting estimates future values.
What the demonstration does: Illustrates ordered event patterns; it is not a full AprioriAll mining run.
References: Agrawal & Srikant: Mining Sequential Patterns (1995)
Stack learned weighted combinations and nonlinear activations to map inputs to outputs. Choose a classification or regression output and objective to match the task.
What the demonstration does: The small neuron lab computes forward outputs, loss and weight updates; it is not large-scale network training.
References: scikit-learn: Multilayer perceptrons; Dive into Deep Learning: Multilayer Perceptrons
Apply learned filters across local regions, reusing their weights at different positions. Stacked layers combine local patterns into broader features; the output head determines the prediction task.
What the demonstration does: Computes a small local filter response; a feature map is not a trained image classifier.
References: Dive into Deep Learning: Convolutional Neural Networks
Process a sequence while updating a hidden state that carries information from earlier steps. LSTM and GRU variants use gates to help control what is retained.
What the demonstration does: Shows a small recurrent-state calculation, not a trained LSTM/GRU or an evaluation of long-range memory.
References: Dive into Deep Learning: Recurrent Neural Networks; Dive into Deep Learning: Modern Recurrent Neural Networks
Use attention to combine information from relevant positions in a sequence, alongside feedforward layers. Encoder, decoder, and encoder–decoder designs support tasks such as classification, text generation, and translation.
What the demonstration does: Normalizes fixed attention scores and combines fixed token-index values under a causal mask; it does not train attention or resolve the ambiguous reference.
References: Vaswani et al.: Attention Is All You Need (2017); Dive into Deep Learning: The Transformer
Train a generator to produce samples and a discriminator to tell training examples from generated ones. The discriminator’s feedback guides improvements to the generator.
What the demonstration does: Uses preset sample positions to explain alternating network updates; it does not optimize a generator and discriminator.
References: Goodfellow et al.: Generative Adversarial Nets (2014)
Learn to reverse a gradual noising process. Generation starts from noise and repeatedly applies learned denoising steps, optionally guided by a text prompt or other condition.
What the demonstration does: Blends fixed noise with a supplied X pattern; it does not run a learned denoiser or generate a new image.
References: Ho et al.: Denoising Diffusion Probabilistic Models (2020); Song et al.: Denoising Diffusion Implicit Models (2020); Ho & Salimans: Classifier-Free Diffusion Guidance (2022)
Learn how to choose actions from feedback about rewards over time. Different algorithms use this framework to learn from rewards, including rewards that arrive long after an action.
What the demonstration does: Illustrates choices and reward feedback in a small environment, not a trained deployment policy or a safety assessment.
References: Sutton & Barto: Reinforcement Learning—An Introduction; Dive into Deep Learning: Reinforcement Learning
Compress an input through a smaller code, then reconstruct the input from that code.
What the demonstration does: Computes a fixed orthonormal projection, reconstruction and mean squared error; no encoder/decoder weights are trained, and it is not fitted PCA.
References: Reducing the Dimensionality of Data with Neural Networks