Incognition logo
Home
Learn
Practice
Leaderboard
0

Visualizations

Every interactive visualizer from Incognition's lessons, grouped by course. Open one up to play with its controls.

Statistics and Probability22

Advanced Probability

Slide the chances of sunny turning rainy and rainy turning sunny, then step forward. The sunny-rainy split settles into a steady balance.

Open & customize

Bayes' Theorem

Switch a condition between 10% and 1% of people, and a grid of 1,000 squares, one per person, lights up who has it. That share is the base rate.

Open & customize

Bayesian Inference

Record red or white chips drawn from a mystery bag. Each chip shifts the chance that the bag is Bag A (70% red) or Bag B (40% red).

Open & customize

Continuous Distributions

Slide the mean to move a bell curve and the standard deviation to change its width. The shaded area between two limits is the probability of landing there.

Open & customize

Discrete Distributions

Slide the chance of success for one yes-or-no trial. The success and failure bars trade height as the mean and variance update alongside.

Open & customize

Histograms & Distribution Shapes

Switch between wide and narrow bins, the ranges that group values, and the same 16 numbers form a new histogram. Hover a bar to light up its dots.

Open & customize

Hypothesis Testing

Slide a test result along the bell curve expected if nothing special is happening. Near the middle it fits; past 1.96 standard deviations it looks too unusual.

Open & customize

Interquartile Range

Step through sorting seven numbers, splitting them at the median and finding each half's middle. The gap between those two, the IQR, spans the middle half.

Open & customize

Mean

Press Equalize to even out four friends' amounts until everyone holds the same: the mean. A second tab shows it as a seesaw's balance point.

Open & customize

Median

Click Sort to line up five numbers, and the middle one is marked as the median. Nudge values or add a point to see how an even count changes it.

Open & customize

Mode

Click Count Frequencies to stack seven numbers into columns, one per value. The tallest column, the value that appears most often, is the mode.

Open & customize

Percentiles & Quantiles

Click any of 20 scores on a number line to see what share of the data sits at or below it. That share is the score's percentile rank.

Open & customize

Pie & Donut

Splits a whole into its parts. Hover a slice or its legend entry to pull it forward.

Open & customize

Probability Basics

Twenty shapes stand for every possible outcome. Pick an event, such as all circles or all blue shapes, and its probability is the share that lights up.

Open & customize

Probability in Neural Networks

Slide a model's raw score and the sigmoid turns it into a probability between 0 and 1. A second slider sets the cutoff that picks class 0 or 1.

Open & customize

Random Variables

Flip one or two coins and watch a rule, the random variable X, turn the result into a number: how many heads came up.

Open & customize

Range of Values

Nudge five values up or down and watch a band stretch from the smallest to the largest. The band's length, max minus min, is the range.

Open & customize

Sampling Distributions

A population of 100 dots is 40% green. Draw samples of 10 and watch each sample's share of green bounce around that true 40%.

Open & customize

Standard Deviation

Step through squaring each value's distance from the mean, averaging those squares, then taking the square root. The result is the standard deviation.

Open & customize

Time Series Analysis

Press Play to draw a line one point at a time, each new value building on the last. The current, lowest and highest values update as it grows.

Open & customize

Variance

Step through finding the mean, drawing each value's distance from it, then adding them up. Distances below the mean are negative, so they all cancel to zero.

Open & customize

Weighted Mean

Three scores count for 20%, 30% and 50% of a grade. Click through to scale each score by its weight, then add them into one final grade.

Open & customize

Linear Algebra2

Matrix Basics

Drag a cell in a 2×2 matrix or an arrow's tip on the graph. Each column is one arrow, so the numbers and the picture always match.

Open & customize

Vector Basics

Drag an arrow's tip around a graph and watch its length (magnitude) and the angle it points (direction) update as you move it.

Open & customize

Programming Fundamentals9

Comparison

Set two numbers and pick an operator like > or ==. The answer flips between True and False as you change them.

Open & customize

Everyday Decision

Flip a yes-or-no question like "Is it raining?" and watch the action change. Every decision is a condition with two paths.

Open & customize

Literal Meaning

Reveal what someone said, then what they meant. People fill in the gaps, but a computer only follows the exact words.

Open & customize

Recipe Order

Shuffle the steps of a pizza recipe and bake it. Run them in the wrong order and the result comes out wrong.

Open & customize

Star Network

A hospital, a bank, a weather service and Netflix sit around one central hub, with animated lines showing information passing through the middle.

Open & customize

Switches

Flip on-off switches and watch patterns of 0s and 1s appear. A pattern only means something because someone decided it does.

Open & customize

Syntax Compare

Toggle between symbol-heavy code and the same idea written in Python. Same logic, much easier to read.

Open & customize

Tool Match

Pair each job with a tool, like a nail with a hammer. The right tool works great, the wrong one struggles.

Open & customize

Variable Reuse

Change one number and see what updates. With a variable, every place that uses it changes together.

Open & customize

Python Fundamentals8

Code Trace

Runs a short program one line at a time, so you can watch each print line add to the output. Press Replay to run it again.

Open & customize

If/Else Decision Flow

Click a grade check to flip it True or False and watch one path light up. Python stops at the first True check; if none is True, else runs.

Open & customize

Operator Precedence

Click Evaluate to work through 2 + 3 * 4 one step at a time. Python does the multiplication first, so the answer is 14, not 20.

Open & customize

Python Data Types

Click a value like 8241, 6.3 or "Ava" to see the type Python gives it. A decimal point or a pair of quotes is enough to change it.

Open & customize

Python Functions

Press 1, 2, 3 to grind, brew and pour a coffee by hand, then turn on One-button mode. Three steps become one press, the idea behind a function.

Open & customize

Python Lists

Add boxes one at a time, each with its own name, then put them all on one shelf. Six names to track become a single list.

Open & customize

Python Loops

Press Play to send five fruits down a belt. The same stamp fires on each one as it reaches the station, just like a loop repeating one action.

Open & customize

Python Variables

Type a name and a value, seal the box, then peek inside. A variable is a named box that holds a value you can find again later.

Open & customize

Python for AI8

Classes & Objects

Stamp out Person objects from one plate. The plate is the class: it lists name and age, while each object holds its own values.

Open & customize

Nested Lists & Dictionaries

Click a row, then a number in it, to build an index like grid[1][2]. The first pair of brackets picks the row; the second picks the number.

Open & customize

Python Dictionaries

Type a drawer name like flour and look it up to open just that drawer. A dictionary finds each value by its name, called a key.

Open & customize

Python Sets

Click each value to send it into the set. A new value takes its own spot, but a repeat flies to its twin and disappears.

Open & customize

Python Tuples

Press Hold them as one to lock three loose values, 255, 0 and 0, into a single case. Three things to carry become one tuple.

Open & customize

Set Operations

Merge two friends' topping sets into overlapping circles, then light up what's in either set, in both, or in only one of them.

Open & customize

String Slicing

Drag the start and stop handles across "hello world" to slice out a piece of text. The start letter is kept; the letter at stop is left out.

Open & customize

Text & CSV Files

Step through names.txt one line at a time. The file is really one row of characters, and each read stops just past a newline, the mark that ends a line.

Open & customize

Data with Python2

DataFrame Selection & Grouping

Pick Label 2, Position 2 or Both, then sort by score. Labels move with their rows but positions stay put, so label 2 and position 2 split apart.

Open & customize

NumPy Axes & Broadcasting

Pick Down columns, Across rows or Everything to squash a grid of numbers into sums or averages. The direction decides which numbers get combined.

Open & customize

Machine Learning in Code3

Data Preprocessing

Put weight and sweetness on one shared 0 to 1 scale so each column gets an equal say. The gap that looked tiny turns out to be the bigger one.

Open & customize

Fit, Predict, Score

Press Study, Answer and Grade to watch a model learn to tell apples from lemons. In code these steps are fit, predict and score, the same for every model.

Open & customize

Model Interpretability

Click the dots to flip through four reasons a model's decisions need explaining: someone is owed an answer, catching mistakes, trust, and the law.

Open & customize

Machine Learning Foundations3

Bar Chart

Lines values up side by side — the go-to whenever a lesson needs to show which category comes out on top.

Open & customize

Clue Scanner

Clues like sales, trend and risk pop up around a search icon as it scans. Like a detective, statistics gathers evidence before drawing conclusions.

Open & customize

Data to Decision

Three boxes show raw data turning into an insight, and that insight turning into a decision. Arrows fill in turn to show the order.

Open & customize

Core Machine Learning10

Clustering

Press Group by Similarity to sort scattered shapes into three numbered groups, then reveal what they are. Naming each group still takes a person.

Open & customize

Comparing Unsupervised Algorithms

Six datasets, one pick each: K-Means, Hierarchical, DBSCAN or PCA. Choose the tool that fits the data and see why after every round.

Open & customize

Correlation & Regression

Click through six scatter patterns, from a tight upward line to a random cloud, and watch the correlation score r move between −1 and +1.

Open & customize

DBSCAN Clustering

Switch between K-Means and DBSCAN on a ring inside a ring. K-Means slices straight through; DBSCAN follows tightly packed points and keeps both rings whole.

Open & customize

Hierarchical Clustering

Press Merge Closest Pair to join the two nearest animals or groups. Each merge adds a branch to a tree of groups called a dendrogram.

Open & customize

K-Means Clustering

Guess how 24 plain dots with no labels split into groups, then press Peek for a hint. K-Means is a method that finds groups like these by itself.

Open & customize

Principal Component Analysis (PCA)

Slide to rotate a line through a cloud of points until it lines up with their spread, and watch the share of information it captures climb.

Open & customize

Similarity & Distance Metrics

Alice, Bob and Charlie are plotted by height and weight. Press Measure the Distances to see who is closest to Alice: the shorter the line, the more alike.

Open & customize

Statistics for Machine Learning

Click through seven stages, from messy raw data to the final test, and see how statistics spots outliers, rescales features and checks the model.

Open & customize

t-SNE & UMAP

Data with too many dimensions to draw shows up as a scrambled cloud of dots. Pick t-SNE or UMAP and watch three hidden groups pull apart.

Open & customize

Classical Machine Learning40

Accuracy

Compare each of ten model guesses with what really happened and call it Correct or Incorrect. The share marked Correct is the model's accuracy.

Open & customize

AUC Score

Press Sort by Score to rank four patients by the model's score and see who was really sick. AUC measures how often sick patients rank above healthy ones.

Open & customize

Bagging

Draw 10 records at random, putting each back after it's picked. Some show up more than once, others not at all, so each tree in bagging gets different data.

Open & customize

Bayesian Optimization

Slide to pick a hyperparameter value, then press Probe Here to measure its score. After three probes, reveal the hidden curve to see how close you got.

Open & customize

Boosting

Press Train Next Tree. Missed points grow larger so the next tree focuses on them, until four trees together get all eight points right.

Open & customize

CatBoost & LightGBM

Answer two yes-or-no questions about your data to see which of three boosting tools fits it best: XGBoost, LightGBM or CatBoost.

Open & customize

Choosing the Right Metric

A model labels all 10,000 transactions Not Fraud and still scores 99.5% accuracy. Click Check Recall to see it caught none of the 50 fraud cases.

Open & customize

Confusion Matrix

Six predictions, each next to what really happened. Press Reveal Next to see if each is a true positive, true negative, false positive or false negative.

Open & customize

Cross-Validation

Press Run Again to test the same model on a new random train-test split. Its score swings from 77% to 96%, so a single split can mislead.

Open & customize

Decision Tree

Click yes-or-no questions to find a mystery animal and watch the options shrink. The questions you ask, in order, trace a path through a decision tree.

Open & customize

Decision Tree Splits

Pick Color, Shape or Weight to split ten fruits into groups. A meter rates how cleanly each split separates sweet from not sweet.

Open & customize

Embedded Feature Selection

Press Train Model and watch each feature's importance grow as the model learns. Weak ones, like Age and Zip Code, drop out with no separate selection step.

Open & customize

Entropy

Click the meter to guess how messy each small group is, then reveal its real entropy: low when every item matches, high when they all differ.

Open & customize

Error Analysis

Click any of six wrong predictions to see what it really was, what the model guessed, how sure it was, and the questions worth asking next.

Open & customize

F1 Score

Highlight each model's strength: one is rarely wrong when it says yes (precision), the other finds nearly every real case (recall). F1 blends the two.

Open & customize

Feature Engineering

Pick two raw features and an operation to build a new one, then check its quality score. Distance divided by Time gives Speed; many mixes score low.

Open & customize

Feature Engineering Best Practices

Click each card that looks like a real data problem, such as a repeated row or an age of 191, then check your answers to see what you caught.

Open & customize

Feature Importance

A loan was denied. Click each clue, like Credit Score or Income, to reveal how much it swayed the decision and find which one mattered most.

Open & customize

Feature Interactions

Pick two features and a way to combine them, like Revenue divided by Orders. Feature quality and model accuracy show whether the new feature helps.

Open & customize

Feature Reduction

Choose keep, remove or transform for each of eight features, and watch accuracy, training time, memory and model complexity react.

Open & customize

Filter Feature Selection

Slide to keep the top 3 to 20 features, each scored before training. Accuracy and results on new data peak near 10, while training time keeps rising.

Open & customize

Generalization

A student scores 100 on practice questions. Click to give the final exam on new questions and watch the score drop to 48: memorizing is not learning.

Open & customize

Gini Index

Guess which question sorts six animals into the purest groups, then reveal how Gini and entropy, two scores for how mixed a group is, rate each one.

Open & customize

Grid Search

Turn candidate values on or off for two tree settings, max_depth and min_samples_split. The total shows how many combinations grid search must try.

Open & customize

Hyperparameter Tuning

Switch a KNN model between k = 1, 7 and 15 neighbors. The shaded regions and the train and test accuracy show how much that one setting matters.

Open & customize

Information Gain

Click each of three questions to split six animals into groups. A bar shows how much uncertainty each one removes, so the best question stands out.

Open & customize

Learning Curve

Drag the training set size up and watch the training and validation scores draw their curves, with the gap between them closing as data grows.

Open & customize

Model Evaluation

A house price model scores 100% on its training data. Click Deploy Model and watch it price a real $820,000 home at just $310,000.

Open & customize

Model Selection

Click Run Fold five times. Each fold tests five models on a different slice of the data, and the leaderboard re-ranks them by average score.

Open & customize

Parameters vs Hyperparameters

A straight line is fit to eight points. Click the slope or the polynomial degree to see which was learned from the data and which was set before training.

Open & customize

Precision

A model flagged ten emails as spam. Reveal them one by one to see how many really were. Precision is the share of flagged emails that were right.

Open & customize

Random Forest

Drag from 1 to 100 trees and watch testing accuracy and prediction stability climb as the trees' mistakes cancel out. Training accuracy stays at 97%.

Open & customize

Random Search

Switch between a 9-point grid and 9 random points. Only the left-to-right setting changes the score, and random search tries 9 values of it, not 3.

Open & customize

Recall

Ten patients all have the disease. Reveal them one by one to see which the model found and which it missed. Recall is the share of real cases found.

Open & customize

Regression Metrics

Drag the prediction above and below the actual price. The residual, actual minus prediction, is positive when the guess is too low and negative when too high.

Open & customize

ROC Curve

A spam model gives an email a 0.82 probability, not a yes or no. Click to ask if that counts as spam: it depends on the threshold, the cut-off you choose.

Open & customize

Validation Curve

Drag a decision tree's depth from 1 to 20. The training score climbs to 100%, but the validation score peaks and then falls as the tree grows too complex.

Open & customize

Why Features Matter

Toggle between a simple and complex model, and between poor and good features, then see which change lifts accuracy more.

Open & customize

Wrapper Feature Selection

Pick features from a pool of six and click Train Model to score that exact mix. Judging features by training a model on them is the wrapper method.

Open & customize

XGBoost

Switch between 100K and 1M rows to compare plain boosting with XGBoost. XGBoost trains far faster with no loss in accuracy, and the gap grows with the data.

Open & customize

Applied Machine Learning26

Batch vs Real-Time Scoring

Slide how many rows the model scores at once, for a Monday offer list or a card payment. Bigger batches score more per second, but the first answer comes later.

Open & customize

Contextual Anomaly

Look at five dots by y, then by x, then both together. Neither value looks unusual on its own, but as a pair one dot falls far below the line the rest follow.

Open & customize

Correlated Feature Shuffle

Shuffle the size column and impossible houses appear, like 8 rooms in 30 m². When two features rise together, shuffling one invents houses that can't exist.

Open & customize

Counterfactual Explanation

Slide Sam's income and debt to find the smallest change that turns a refused loan into an approval. That change is the counterfactual explanation.

Open & customize

Data vs Concept Drift

Switch from the training year to data drift, where the mix of purchases changes, or concept drift, where fraud rates change and only late labels show it.

Open & customize

Decile Drift Check

Switch between training, a calm day and an app-launch day. Customers fall into ten fixed age slices, and any slice far off its 10% share turns amber.

Open & customize

Filter Bubble

Step day by day as the app swaps out the kind of video Cara clicks least, until all four are Cooking. Then save one slot for variety and compare.

Open & customize

Global Surrogate Tree

Pick a tree depth and watch a small decision tree copy a random forest's loan decisions. Ringed dots mark where the copy and the forest disagree.

Open & customize

Isolation Forest

Make random cuts until one payment stands alone. The odd $60 is cut free in about 1 cut on average, while $15, deep in the crowd, takes nearly 4.

Open & customize

Item-Based Recommendations

Pick a film you watched. Its column of ratings is compared with each other film's, and the one people felt the same way about becomes the top pick.

Open & customize

Local Outlier Factor

Switch from one fixed circle to LOF, which compares how crowded a point is with the points near it. Add a point just off the grid: only LOF singles it out.

Open & customize

Machine Learning Lifecycle

Step month by month after launch. If the line ends at Deploy, accuracy slips unseen; make it a loop and Monitor spots the drop, then Retrain lifts it back.

Open & customize

Model Drift & Monitoring

Slide through the year after launch as a model's accuracy slips from 94% with no error or warning. The reading turns red once it falls below 85%.

Open & customize

Model Versioning

Rerun training to rebuild a shipped model. With no seed saved for its random choices, each run scores differently; record the seed and every run matches.

Open & customize

Partial Dependence Plot

Slide one home's temperature to see its predicted electricity use trace a curve. Do it for every home, and their average is the partial dependence line.

Open & customize

Permutation Importance

Shuffle one column of a loan table and score the same model again. The bigger the drop in accuracy, the more the model relies on that column.

Open & customize

Random Sampling

Draw a sample by hand or at random, then compare it back against the full population.

Open & customize

Random Split Leakage

Shuffle a random split of 40 days of sales, and most guesses borrow from days after the test day. Switch to a cut-off date to see the honest, larger miss.

Open & customize

Retraining Strategies

Pick when to retrain: never, on a schedule, or when accuracy drops below 85%. Then slide through the year to see how long it stays too low.

Open & customize

Scaled Forecast Error

Slide how far a forecast misses each day. R² keeps saying it beats a flat average, but scaled error compares it with simply repeating yesterday.

Open & customize

Sequence Order

Shuffle the six words of “the cat sat on the mat” and the sentence stops making sense. Nothing is added or removed, so the order carries the meaning.

Open & customize

Shapley Values

Reveal Cara's income and debt one at a time, in both orders, then average how far each moved her score. That average is each feature's Shapley value.

Open & customize

Time Series Anomalies

Step from a fixed alarm line, which rings every busy evening, to residuals (actual minus expected), which catch the real 4 a.m. spike and 8 p.m. drop.

Open & customize

Training vs Inference

Switch between training and inference. Training runs data forward, sends the error backward and updates the model; inference only runs forward.

Open & customize

Training-Serving Skew

Pick how the live app prepares a $40 customer for the model. Only the saved training pipeline lands it in the right place, yet no error ever shows.

Open & customize

Walk-Forward Validation

Step through three folds on 24 days of coffee sales. Each one trains on the past and tests the next four days, then the cut-off moves forward.

Open & customize

Calculus & Optimization5

Functions & Derivatives

A function is a rule that turns each input into one output. Pick a rule, slide the input x, and watch the point ride along its curve.

Open & customize

Gradients & Partial Derivatives

Drag the dot across a hillside seen from above. The two inputs, x and y, pick a spot, and the output is its height: brighter means higher.

Open & customize

Integrals as Area

Slide to fill the area under a curve with more rectangles. The thinner they get, the closer their total comes to the true area.

Open & customize

Limits & Continuity

Slide to move two dots toward x = 2 from both sides of a curve. Both close in on the same height, 4, and that height is the limit.

Open & customize

Optimization & Gradient Descent

Slide one knob and watch the score move along a U-shaped curve. Optimization means finding the setting with the lowest score, at the bottom.

Open & customize

Neural Networks & How They Learn47

Activation Functions

Slide the input along the S-shaped sigmoid curve. However large or small the input, the output always lands between 0 and 1.

Open & customize

Adam Optimizer

A diagram of how Adam, a popular training method, joins two ideas: momentum remembers the recent direction, and RMSProp sizes each weight's step to suit it.

Open & customize

Artificial Neuron

Slide three inputs and their weights. Each input is multiplied by its own weight, which sets how much it counts. That is a neuron's first step.

Open & customize

Backpropagation Loop

Shows the four stages of training (forward, loss, backward, update) with Forward lit up: the input passes through every layer to make a prediction.

Open & customize

Backward Pass

Four layers in a row, with only the output lit up. Backpropagation starts at the end, the only place the error is known, and works back toward the input.

Open & customize

Batch Normalization

Slide from layer 1 to 5 and watch the values drift and spread out, so each layer's input keeps shifting. Batch normalization is built to fix this.

Open & customize

Batch Size

Click Run one update and all 32 examples light up for a single update. A full batch reads every example first, then takes one careful step.

Open & customize

Binary vs Categorical Cross-Entropy

Slide the model's chance that a message is spam. With two options, one number sets both, and the loss drops as the right answer, spam, gets more likely.

Open & customize

Biological Neuron

Click the dendrites, cell body and axon of a brain cell to learn each part's job: receive signals, combine them, and pass the response on.

Open & customize

Chain Rule in Networks

Slide to nudge x and follow the change along a chain: h moves 2 times as much, then y moves 3 times that. To cross a chain, multiply the rates.

Open & customize

Choosing a Loss Function

Read a task, like predicting a house price, then click Reveal to see which loss fits it and why. Next task moves on to spam emails and animal photos.

Open & customize

Choosing an Optimizer

The safe first pick for updating weights is Adam, with a learning rate of 0.001. It works well enough on almost any problem without tuning.

Open & customize

Comparing Optimizers

The paths of three optimizers, or ways of stepping downhill, on a round bowl seen from above. On an easy shape like this, all three do fine.

Open & customize

Computational Graph

Click to add one node at a time: two inputs, a multiply step, then an add step. Any calculation a network does can be drawn as a graph like this.

Open & customize

Cross-Entropy Loss

Slide how sure the model is that the answer is cat, and it really is a cat. Sure and right costs almost nothing; the less sure it is, the higher the loss.

Open & customize

Data Augmentation

Click Next variation to see one image rotated, flipped, zoomed or brightened. It still shows the same object, so each copy is a free new training example.

Open & customize

Diagnosing Loss Problems

A flat loss curve means the model isn't learning at all. Click the button to swap in a healthy run: a steep early drop that levels off.

Open & customize

Dropout

Click to switch off three of the ten neurons in a layer. For that training step, the network has to find its answer without them.

Open & customize

Early Stopping

Click Train longer to extend two loss curves. Training loss keeps falling, but validation loss, on held-back data, turns upward: time to stop.

Open & customize

Exploding Gradients

Slide to stack more layers, each multiplying the gradient by 2.5. Since 2.5 is above 1, the total snowballs into the hundreds of thousands.

Open & customize

Forward Pass

Click to feed three inputs (rooms, age and area) into a neuron one at a time. Every forward pass begins this way, with the inputs arriving.

Open & customize

Full Training Run

Click to fill in the plan for a full training run, from the loss and optimizer to batch size, learning rate schedule and when to stop.

Open & customize

Gradient Descent on Networks

Click to take one step downhill on a loss curve. The weight, its gradient (the slope there) and the loss all update at once.

Open & customize

Layer Gradients

Slide the number of inputs and outputs and watch the weight count change. Each link between them is one weight, so the total is inputs times outputs.

Open & customize

Learning Rate

Click Step to walk down a loss curve when the learning rate, the size of each step, is far too small. Each step barely moves, so progress is slow.

Open & customize

Learning Rate Schedule

A flat line shows the learning rate, or step size, never changing during training. That works early on, but near the end the steps are too big to settle.

Open & customize

Local Minima & Saddle Points

Slide the starting point on a bumpy loss curve and see where walking downhill ends up. Some starts reach the deepest dip; others get stuck in a shallow one.

Open & customize

Loss Function

Slide a guessed house price toward the real $450k and watch the gap shrink. That gap, how wrong the guess is, is where loss begins.

Open & customize

Loss Landscape

Slide one weight along a bowl-shaped curve showing the loss at every setting. With a single weight the landscape is just a curve, and the bottom is the goal.

Open & customize

Mean Absolute Error & Huber

Slide an error below or above zero and see its size with the minus sign dropped. An error of -4 costs exactly the same as +4, with no squaring.

Open & customize

Mean Squared Error

Click to square four prediction errors. The minus signs vanish, and the biggest error grows far bigger than the rest.

Open & customize

Momentum

Seen from above, plain downhill steps zigzag across a narrow valley and creep slowly toward the bottom. This is the problem momentum fixes.

Open & customize

Network Depth

Two small networks side by side: a shallow one with one hidden layer and a deep one with three. Adding hidden layers is what makes a network deep.

Open & customize

Neural Network Layers

Click to add neurons to a layer, from one up to four. Each of the three inputs connects to every neuron you add.

Open & customize

Non-Linearity

Slide the weight and bias of a single neuron. However you set them, its output, z = wx + b, only ever draws a straight line.

Open & customize

Outlier Penalty

Click to swap one small error for a huge one. The mean squared error (MSE) jumps from 2.2 to 30.8, while the mean absolute error (MAE) only reaches 3.6.

Open & customize

Overfitting in Deep Networks

Click to swap a simple trend line for a wiggly curve that chases every point. That is overfitting: learning the points by heart, not the pattern behind them.

Open & customize

Representation Learning

Tap a highlighted box in either pipeline. In classical machine learning, people design how to describe the input; in deep learning, the network learns it.

Open & customize

RMSProp

Bars show the gradient, or slope, for five weights, from 4.2 down to 0.05. One shared learning rate is too big for some and too small for others.

Open & customize

Single-Weight Gradient

Slide one weight and watch the loss respond: it falls as the weight nears 3, then rises again past it. A gradient puts a number on this link.

Open & customize

Softmax

Slide the raw scores a network gives to cat, dog and bird. They can go negative and their sum means nothing, so they aren't probabilities yet.

Open & customize

Training Curves

Training loss and validation loss, measured on held-back data, fall together, then level off with a small, steady gap. This is what a healthy run looks like.

Open & customize

Training Hyperparameters

Click Show more to list the hyperparameters: settings the network can't learn, so you choose them yourself, like learning rate and batch size.

Open & customize

Vanishing Gradients

Slide a point along the sigmoid curve and read its slope. It is never above 0.25 and nearly zero at the ends, so gradients shrink layer by layer.

Open & customize

Weight Initialization

Six weights all start at zero. Click Train one step to see why that fails: each neuron gets the same update, so all six act as one.

Open & customize

Weight Regularization

Click to add a weight penalty to the loss. Large weights now cost extra, so the model must balance fitting the data against keeping its weights small.

Open & customize

Where Error Comes From

Slide the network's prediction toward its target of 1 and watch the gap shrink. That gap is the error, and it first appears at the very end of the network.

Open & customize

Deep Learning for Images40

AlexNet

Click year by year through the winning error rate in ImageNet, a big photo contest. It fell slowly, then AlexNet cut it by over ten points in 2012.

Open & customize

CNN Building Blocks

Click Conv, Activation, or Pool to see what each block does. These three pieces, repeated, make up every convolutional network (CNN).

Open & customize

CNN Head

Click to flatten the small, deep block at the end of a CNN into one long list. The grid is tiny by now, so losing its layout costs little.

Open & customize

Comparing CNN Architectures

Click to add famous image networks in order, from LeNet-5 to ResNet-152, and compare their layer counts. Depth grew slowly, then shot up.

Open & customize

Convolution Operation

A 3×3 patch of pixel values next to a 3×3 filter. Convolution lines the filter up over the patch and combines the two into a single number.

Open & customize

Edge Detection

Slide where a row of pixels turns from light to dark. The row of differences below lights up only at the jump, because an edge is a change in brightness.

Open & customize

Feature Maps

Click to run one filter over a simple image. The result is a feature map: bright wherever the filter found its pattern, dark everywhere else.

Open & customize

Filters as Detectors

A filter is a tiny 3×3 grid of numbers, negative on one side and positive on the other. This one looks for spots where the image goes from dark to light.

Open & customize

Freezing & Fine-Tuning

A pretrained network with every block frozen (locked) except the new head at the end. Training just the head is fast and needs very little data.

Open & customize

Image Augmentation Techniques

Click to add the standard changes to one picture: a flip, a crop, a small turn and a brightness boost. Each copy is new training data with the same label.

Open & customize

Image Classification Pipeline

Click through the seven steps of building an image classifier, from collecting photos to a final check on test photos kept aside until the end.

Open & customize

Image Preprocessing

Photos arrive wide, tall, or square. Click Resize to bring each one to the same 224×224 size, since a network expects one fixed input shape.

Open & customize

Image Segmentation

Click to label every pixel of a street scene as sky, building, car or road. You get an exact outline of each thing, not just a box around it.

Open & customize

Images as Pixel Grids

Click to zoom in, and a smooth-looking image turns into an 8×8 grid of squares. Each square, or pixel, holds one number for its brightness.

Open & customize

Inception Module

Click through a distant bird, a face, and a whole building. Each suits a different filter size, so an Inception module runs several sizes side by side.

Open & customize

Intersection over Union (IoU)

A box marks a detected dog, with a label and a 0.94 score for how sure the model is. The box is four numbers: x and y for position, width and height for size.

Open & customize

Kernel Size

A 3×3 window on an 11×11 grid. 3×3 is the most common kernel (filter) size: the smallest square with a middle pixel and pixels on every side.

Open & customize

LeNet-5

Click each layer of LeNet-5, the 1998 network that read handwritten digits: two rounds of conv and pool, then dense layers, then one score per digit.

Open & customize

Max vs Average Pooling

Max pooling turns a 2×2 window of four numbers into one by keeping only the largest. The strong 220 survives and the three small values are dropped.

Open & customize

Multiple Filters

An image goes through one filter and comes out as one feature map. One filter looks for just one pattern, so real layers use many filters at once.

Open & customize

Object Detection

Click to detect each object in a scene, one at a time: a dog, a cat, a sofa. Each gets its own label and box, not one label for the whole picture.

Open & customize

Padding

Slide to stack 3×3 conv layers and watch a 32×32 image shrink to 30×30, then 28×28, and on down. Padding, an extra border of pixels, stops this.

Open & customize

Parameter Sharing

Click to step a 3×3 filter across a 6×6 grid. Its nine weights stay exactly the same at all 16 positions, which is what parameter sharing means.

Open & customize

Pooling

Slide to add pooling stages. Each one halves the grid, from 32 down to 2, so there is less work to do and each spot covers more of the image.

Open & customize

Receptive Field

The green square is one output of a 3×3 layer. The purple patch around it marks every input pixel that can change it: its receptive field.

Open & customize

Residual Connections

Click to add 36 more layers to a 20-layer network. Training error gets worse, not better, which is the puzzle residual connections solve.

Open & customize

ResNet

Click to stack residual blocks, up to eight. ResNet is just this one block repeated, and the green dot on each marks its skip connection.

Open & customize

RGB Channels

A tiny image, pixel by pixel. It is really three grids of numbers stacked together: one for red, one for green, and one for blue.

Open & customize

Sliding Filter

Use the row and column sliders to move a 3×3 filter over a small image. Its score is high only when the window covers the edge between dark and light.

Open & customize

Small Datasets

A curve of accuracy against dataset size, from 100 images to a million. Trained from scratch, a model needs a huge pile of images before it is any good.

Open & customize

Spatial Structure

Click any pixel in a simple sky-and-ground picture to outline it and the eight around it. Nearby pixels are almost always alike, unlike random noise.

Open & customize

Stacking Convolutional Layers

A 32×32 image passes through one conv layer, then one pooling layer. Conv makes the block deeper, one slice per filter; pooling halves its width and height.

Open & customize

Stride

Click to step a 3×3 window across a 7×7 grid. How far it moves each time is the stride; at stride 1 it makes 25 stops and a 5×5 output.

Open & customize

The Flattening Problem

Click to flatten a 4×4 image into one long list of 16 pixels, the shape a regular layer needs. Pixels that sat one above the other end up four places apart.

Open & customize

The Vision Problem

Click the dots to switch between three vision tasks: say what is in a picture, box where it is, or give every pixel a label.

Open & customize

Transfer Learning

Slide the number of images you have. A few hundred is nowhere near enough to train 25 million weights from scratch, so you start from a trained model.

Open & customize

VGG Network

Click to swap one 5×5 filter for two 3×3 filters in a row. Both see a 5×5 patch, but the pair needs 18 weights, not 25, so VGG uses only 3×3.

Open & customize

Vision Failure Modes

Click to move a cow from grass to a beach, and the model calls it a boat. It had learned that grass means cow, not what a cow looks like.

Open & customize

Vision Transformer

Click to cut an image into a grid of small patches. A Vision Transformer then treats each patch like a word in a sentence, instead of sliding a filter.

Open & customize

What a CNN Learns

The first layer of a trained image network: edge filters at every angle. Click to swap in the simple color-blob filters that fill out the rest.

Open & customize

Sequences, Language & Attention41

Attention Formula

Click any piece of the attention formula to see its job, from scoring every query against every key to blending the values by the final weights.

Open & customize

Attention in Translation

Click to add attention to a translation model. Instead of one summary of the French sentence, the decoder can look at every word directly, at every step.

Open & customize

Attention Map

A grid for "the cat sat": each row is a word paying attention, each column a word it looks at. Darker squares mean more attention.

Open & customize

Attention Score

Click to multiply a query and a key, one matching pair of numbers at a time, adding as you go. The total, called a dot product, is the attention score.

Open & customize

Attention Softmax

Click to turn four raw word scores, one of them negative, into attention weights with softmax. Every weight becomes positive and lands between 0 and 1.

Open & customize

Attention vs Recurrence

Slide how far apart two words are. In an RNN, information must pass through every step between them; with attention it is always one step.

Open & customize

Backpropagation Through Time

Step forward through five time steps of a recurrent network, each one reusing the same weights. This is the chain that the error later travels back along.

Open & customize

BERT

BERT lets "bank" in "the bank by the river" see words on both sides. Click to look left only, and there is no way to tell which bank is meant.

Open & customize

Bidirectional RNN

Step through "The bank was closed for repairs" word by word. A one-way RNN at "bank" cannot yet see the later words that explain it.

Open & customize

Contextual Embeddings

Click through three sentences where "bank" means a riverside, a place for money, or a tilt. The word only gets its meaning from the words around it.

Open & customize

Embedding Space

Pick cat, car or run to light up its nearest words on a word map. Words with similar meanings end up close together.

Open & customize

Encoder-Decoder Transformer

The original transformer has two stacks of layers. Click encoder or decoder to see each job: read all the input at once, or write the output token by token.

Open & customize

Feed-Forward Sublayer

Attention can only mix words by averaging them. Click What is missing? to see what the feed-forward layer adds: reshaping each vector in a way no average can.

Open & customize

Full Transformer

Click any layer of a whole transformer, from token embeddings at the bottom to output probabilities at the top, to see what it does.

Open & customize

GPT

Click to see the probability a GPT model gives each candidate next word after "the cat sat on the". Predicting the next word is all it does.

Open & customize

GRU Cell

Switch from an LSTM to a GRU and watch two memory lines merge into one and three gates shrink to two. Same idea, fewer moving parts.

Open & customize

Layer Normalization

Bars show the numbers growing bigger at each layer as small changes add up. Turn normalization on to reset every layer to a steady size.

Open & customize

LSTM Cell

A plain RNN carries one memory, rewritten at every step. Click to add an LSTM's cell state: a second, long-term memory that is hard to disturb.

Open & customize

LSTM Gates

Slide the forget gate to choose how much of its old memory an LSTM keeps. Near 1 it keeps everything; near 0 it wipes the memory clean.

Open & customize

Masked Attention

A model guessing "sat" can see the whole sentence, answer included, so it learns nothing. Click Block the future to hide the words ahead.

Open & customize

Multi-Head Attention

One attention pattern for "slept" puts most of its weight on "cat". Its weights add up to 1, so it can't also focus hard on "quietly".

Open & customize

One-Hot Word Vectors

Click a word to see its one-hot vector: a list as long as the vocabulary, all zeros except a single 1 in that word's own slot.

Open & customize

Positional Encoding

Swap "dog bites man" to "man bites dog" and attention sees the exact same unordered set of words. That lost order is why position must be added in.

Open & customize

Queries, Keys & Values

Click Query, Key or Value to see the three roles attention gives each word: what it looks for, what it offers to match, and what it passes on.

Open & customize

Recurrent Neural Network

Step through "the cat sat down" one word at a time, left to right. A recurrent network reads text in order, the same way you read this sentence.

Open & customize

RNN Hidden State

A short list of numbers, the hidden state, is a recurrent network's whole memory of what it has read so far. It is a summary, not a copy of the words.

Open & customize

Scaling Laws

Slide model size from a million to a trillion parameters and watch loss fall smoothly. Each new gain costs far more than the one before.

Open & customize

Self-Attention

In translation, queries come from one sentence and keys and values from another. Click to switch to self-attention, where one sentence supplies all three.

Open & customize

Sequence-to-Sequence Model

Step through turning French "le chat noir" into "the black cat". An encoder reads all the input first, then a decoder writes the output one word at a time.

Open & customize

Sequences vs Fixed Inputs

A fixed-size image goes in and a fixed list of scores comes out. That size is built into the network, but sentences come in any length.

Open & customize

Text as Numbers

Click Next to turn the word "cat" into an ID number, then into a list of numbers — the form a model needs before it can work with text.

Open & customize

The Sequence Problem

Click What else? to list what is already solved for text: splitting it into tokens, an embedding for each token, and similar vectors for similar words.

Open & customize

Tokenization

Splitting by whole words makes "unhappiness" a single token. If the model never saw that word in training, it becomes unknown and its meaning is lost.

Open & customize

Transformer Block

Click the four parts of one transformer block — self-attention, feed-forward and two add & normalize steps — to see what each does.

Open & customize

Transformer Stack

Click to add transformer blocks one by one, up to six. Each new block gives every token one more round of sharing information.

Open & customize

Translation Bottleneck

A four-word French sentence is squeezed into one fixed-size vector. The decoder, which writes the translation, sees nothing but that vector.

Open & customize

Unrolling an RNN

Click Unroll it to redraw one looping RNN cell as a chain of four steps. It is the same network used four times, not four different networks.

Open & customize

Weighted Context

Click to multiply each word's value vector by its attention weight, one word at a time. Blending these weighted values is how attention builds its output.

Open & customize

Why RNNs Forget

To choose "was" over "were", a model must still remember "cat" eight steps later. Slide to change the distance between the two highlighted words.

Open & customize

Word Embeddings

Click to swap a one-hot vector, all zeros but a single 1, for an embedding: a short list of numbers where similar words get similar values.

Open & customize

Word2Vec

Click to hide the middle word of a sentence, then guess it from the words around it. Word2Vec learns what words mean from this guessing game.

Open & customize

Generative & Applied Deep Learning37

Adversarial Game

Step through rounds between a forger and a detective. Each one improves because the other does, which is how the two networks in a GAN learn.

Open & customize

Autoencoder

Click to rebuild a grid pattern after it squeezes through a narrow middle layer. An autoencoder learns by copying its own input this way.

Open & customize

Autoencoder Applications

Click each sample to see how badly an autoencoder trained on normal data rebuilds it. The unusual one scores a high error and is flagged.

Open & customize

Autoencoder Bottleneck

Slide to narrow or widen the bottleneck, the thin middle layer of an autoencoder that all 64 input numbers must squeeze through.

Open & customize

Bias & Fairness

Click to break a 91% overall accuracy down by group. A hidden gap appears: 96% for group A, but only 71% for group B.

Open & customize

Conditional GAN

Pick circle, square or tall, and the generated shapes all change to match. Giving a GAN a label lets you ask it for what you want.

Open & customize

Deep Learning Map

Click each of the five areas of deep learning, from single neurons to image generators, to see what each one covers.

Open & customize

Denoising Autoencoder

Slide the damage up to corrupt more squares of a clean pattern. A denoising autoencoder breaks its input on purpose, then learns to repair it.

Open & customize

Diffusion Guidance

Add a condition and four unrelated samples all turn into the same shape. A condition is how you tell a diffusion model what to make.

Open & customize

Diffusion Models

Slide the noise up to turn a clean pattern into random static. Diffusion models learn to run this easy process backwards to create images.

Open & customize

Diffusion vs GAN

Switch between a GAN's two competing networks and diffusion's single denoiser. That one difference explains most of how the two behave.

Open & customize

Evaluating Generated Images

Flip from classifying to generating. A classifier can score 94% correct, but a generated image has no right answer to check it against.

Open & customize

Forward Diffusion

Slide the step count up and watch noise slowly wash out a simple pattern. Each step keeps a little less of the original and adds more static.

Open & customize

Full Diffusion System

Click each of the five parts of a text-to-image diffusion model, from the text encoder to the final decoder, to see the job it does.

Open & customize

GAN Training Loop

Step through one round of GAN training. The discriminator learns to spot fakes, then the generator learns to fool it, one network at a time.

Open & customize

GAN Training Stability

Slide the balance between generator and discriminator. Training only works while the two stay roughly matched, so neither one wins outright.

Open & customize

Generative Models

Turn the arrow around. A classifier maps an image to one right label; a generator takes one description and can make endless valid images.

Open & customize

Generator vs Discriminator

Click each of the two networks in a GAN to see its job. One turns random noise into outputs; the other judges each example real or fake.

Open & customize

Image-to-Image Translation

Click Translate to turn a sketch into a photo. Give a generator a whole image instead of a label and it becomes a translator.

Open & customize

Latency Budget

Slide the latency, the wait between a click and a reply, to see how it feels to a user: instant, responsive, sluggish or broken.

Open & customize

Latent Diffusion

Slide the image size to see why diffusing raw pixels is slow: each pixel value is reworked 50 times. Latent diffusion uses a small compressed code instead.

Open & customize

Latent Space

Click a point to see which digit it is and its code, a pair of numbers. In latent space every input is one point, so a dataset becomes a cloud.

Open & customize

Latent Walk

Slide between two faces, A and B. Mixing their codes and decoding the mix gives new in-between faces that were never in the training data.

Open & customize

Learning Without Labels

Slide how many of 100 examples have a label. Collecting data is easy, but someone must tag each example by hand, so most data has no label.

Open & customize

Mode Collapse

Six random codes give six different shapes. Click to collapse them, and all six give the same shape. That GAN failure is called mode collapse.

Open & customize

Model Serving

Tap each layer a request passes through: client, API layer, model, response. Wrapped in an API, the model becomes something any app can call.

Open & customize

Noise Prediction

Click to reveal what the network outputs for a noisy input. It is not a clean image, but its best guess at the noise that was added.

Open & customize

Noise Schedule

Slide through 1,000 noising steps to see how much of the original image is left at each one. That fixed plan is called the noise schedule.

Open & customize

Notebook vs Production

Click "Ship it" to take a model with 96.4% test accuracy out of the notebook and into real use, where accuracy is just one of many concerns.

Open & customize

Pruning & Distillation

Click to see which weights in a trained network matter. Most sit near zero, costing memory and time while adding almost nothing.

Open & customize

Quantization

Pick 32, 16, 8 or 4 bits per weight and watch a 7-billion-weight model shrink from 28 GB to 3.5 GB. Fewer bits, smaller model.

Open & customize

Reconstruction Loss

Slide to push the rebuilt copy away from the original. Reconstruction loss is one number for that gap, and an autoencoder learns by shrinking it.

Open & customize

Reverse Diffusion

Draw fresh random noise, the starting point of reverse diffusion. Every detail in the final image gets added by removing noise step by step.

Open & customize

Text-to-Image Prompts

Step through how the prompt "a red bicycle" is split into tokens, then turned by a text encoder into vectors an image model can use.

Open & customize

VAE Sampling

Switch from rebuilding to generating. Drop the encoder, feed the decoder a random code, and a VAE becomes a model that makes new outputs.

Open & customize

Variational Autoencoder

Click to grow each exact code into a small cloud. A variational autoencoder (VAE) encodes each input as a cloud and draws its code from inside it.

Open & customize

What GANs Taught Us

Click through three things GANs did well: crisp images, a loss learned by a judge network, and making an image in one fast pass.

Open & customize