Awesome Testing

Learning lesson 01 · Learn from a mistake

What is the smallest machine that can learn from an error?

examplepredictionlossgradientchanged parameters
Prior knowledge
Comfort reading simple equations helps. The course introduces the calculus it uses.
Study time
2–3 hours guided · about 7 hours of optional deep dives
By the end
Trace how a supervised model turns error into parameter updates, then diagnose where training evidence can mislead you.

Start here

What it is, when it helps, and where we are going.

Machine learning is a way to fit a parameterized rule from examples so that it can make useful predictions on new cases, rather than encoding every decision by hand.

Good use cases

  • Classify, rank, or estimate outcomes when representative historical examples exist.
  • Learn useful numerical representations from images, text, audio, or structured observations.
  • Adapt a prediction rule as new labelled evidence becomes available and the objective remains stable.

What it does not solve

Prefer ordinary software rules when the desired behavior is fully known, must be exact, or lacks enough representative evidence to support a learned claim.

Learning path

  1. 01One mistake
  2. 02Vectors and loss
  3. 03Gradients and backpropagation
  4. 04Representations
  5. 05Generalization evidence

01 · Smallest useful mechanism

A learning machine changes parameters when its prediction disagrees with evidence.

Give one artificial neuron numerical inputs, multiply them by weights, add a bias, and threshold the score. The output is a prediction. During training, a labelled example reveals whether that prediction was wrong. The perceptron update adds a small, directed correction to the weights, so the same mistake becomes less likely on the next pass.

A perceptron stores a linear decision boundary in its weights and bias; an update nudges that boundary only when an example is misclassified.

02 · Experiment

Test the prediction

Exact perceptron updates · deterministic teaching data

Every input, score, mistake, and weight update is declared in the browser. The values demonstrate the learning rule rather than reconstructing a production model.

Loading the learning experiment…

03 · Reason from evidence

A spam perceptron makes the same mistake immediately after the training log says that example triggered an update.

Your brief: Write a short diagnosis that separates a bad update from stale parameters and an impossible boundary. Do not suggest more training until you know which failure you have.

Evidence your answer should use

  • The feature vector, label, score, and prediction before the update
  • The exact weight and bias deltas, followed by the new score
  • A check that the updated parameters reached inference
  • A separability check across the full labelled set

There is no reveal button here. A strong response names the claim, the evidence that would test it, and what the evidence cannot establish.

Your learning artifact

Write the argument you would defend

Stored only in this browser. No account required; course reset does not delete it.

04 · Check your understanding

When does the perceptron update its weights?

Optional referenceDeep dive / reference chapterOpen the complete essay, diagrams, mathematics, exercises, glossary, and sources when you want more depth.

Next: The update is compact because both the example and the model are vectors. Next we make that geometry explicit.