Beta

Sync to cloud

Uses your current signed-in YoolVi account. A Learn profile is not required.

Upload a snapshot of this browser’s saved lesson work across all subjects, including notes, experiments, journal and review history. Existing guest work is included only when you confirm below. This does not upload account credentials or award XP.

Sync uploads to your private account; it does not automatically merge or replace this device’s work. On another device, download the cloud copy and use My Learning’s backup import. The previous cloud snapshot is retained when a new one replaces it.

Export or import this device’s work

No background uploads. Edits made after a snapshot need another sync. On shared devices, work is bound to the first account observed by cloud sync; another account must use a separate browser profile. Keep your own downloaded backup too.

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Back to One neuron learning

Shared AI lesson · One neuron learning

Add activation

Reflect on your price experiment · optional

Why did that happen?

The shop charges 3 credits for each notebook, plus 2 for packing. The computer uses the same kind of rule, but starts with different numbers. It changes those numbers to reduce its mistakes. The price per notebook is called a weight. The fixed extra amount is called a bias.

Explain it in your own words · optional

Compare your prediction and explanation with the observed numbers.

Try a different case · guided practice
A different case

A different service uses price = 2 × items + 3. At 4 items, what happens if only the weight rises from 2 to 2.5?

A different service uses price = 2 × items + 3. At 4 items, what happens if only the weight rises from 2 to 2.5?
How this helps your classifier project

In the classifier, parameters will shape a boundary rather than a price line. Keep the same question: which input changes which intermediate value, and how does that change the output?

One more rule: activation

The price model uses identity: it leaves the total unchanged. An activation function is the rule that turns that total into the output.

Another rule, ReLU, keeps positive totals and replaces negative totals with zero. Zero stays zero. Compare the same total under both rules.

Separate activation illustration · weight 1, bias 0
1 · Input-2Number supplied
Inside the artificial neuron
2 · Multiply by weight-2 × 1= -2Weight multiplies the input
3 · Add bias-2 + (0)= -2Bias adds a fixed amount

Activation: ReLU · keep positive totals; replace negative totals with zero

4 · Output0Result after activation

-2 × 1 + (0) = -2; ReLU(-2) = 0

For total -2, identity gives -2; ReLU gives 0.

Activation comparison help · optional

Compare this activity with a reference you choose. Hints use only the public settings and results listed below, stay on this device, and do not assess your understanding.

Why add this rule? With one input, stacking only multiply-and-add calculations still produces a straight-line relationship. ReLU introduces a bend at zero. Nonlinear rules like this let networks represent relationships a straight line cannot.

This temporary illustration does not train or change your saved price model. Different tasks use different activation rules; ReLU is not required for every output. You will explore its role further in the two-switch lesson.

Recap: the price model and training

The computer uses one rule for every order: multiply the number of notebooks by its price guess, then add its packing-fee guess.

At first, those guesses can be wrong. Each learning step changes them to make the example prices closer. That is what “learning” means in this small example.

The price-per-notebook setting is called a weight. The fixed packing fee is called a bias. Together, this little calculation is a simple kind of neuron.

Read the longer explanation and the maths · optional
READ & CONNECT

Understand what changed.

Back to the experiment

A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.

Same learning goal in both modes: Use a few notebook prices to work out the next one.

The idea in everyday terms

A neuron is a small calculation with adjustable numbers. In the shop example, multiply the number of items by the price per item, then add the packing fee. The model calls these two adjustable numbers the weight and bias. Increasing the weight makes the price rise faster as you add items; increasing the bias adds the same amount to every prediction.

For three items at three credits each and a two-credit packing fee, the prediction is 3 × 3 + 2 = 11 credits. The playground’s four supplied prices are 5, 8, 11 and 14 credits for one through four items.

What to watch in the experiment

Learning compares predicted prices with the supplied prices, measures the mistakes and adjusts both numbers. The error score here is the average of squared mistakes. A large mistake therefore matters more than a small one.

What this does not establish

Fitting these four fictional prices does not prove that the model will predict other prices well. Its straight line cannot express every possible pattern.

Open the full worked examples, calculations and limitations

This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.

A small calculation with a big job

Imagine a shop where every item costs the same amount, plus a fixed packing fee. A simple model can estimate the total price from the number of items.

It needs just two adjustable numbers: a weight for the price per item, and a bias for the fixed fee. Together, they form our first neuron.

This is a made-up price example designed to make every calculation visible. Real prices depend on many more things.

What is actually learning?

In the playground, the four example prices are 5, 8, 11, and 14 credits for one through four items. The model begins with a poor guess: a weight of 1 and a bias of 0.

Training compares its predictions with the examples. It measures the errors, calculates how the weight and bias affect those errors, and adjusts both a little. Repeating this process is gradient descent.

  • Weight changes the slope. A larger weight adds more to the prediction for each extra item.
  • Bias changes the starting point. It raises or lowers every prediction by the same amount.
  • Loss measures the mistakes. Here, we average the squared errors across all four examples. Large mistakes count more.

One neuron is a starting point

This lesson uses a neuron with a linear output: its graph is a straight line. Later, we’ll add nonlinear activation functions and connect neurons into layers, so the network can represent more complicated patterns.

A perfect fit to these four examples only tells us the model fits this tiny training set. We still need new examples to check generalization.

Go deeper: see one learning update

For each example, calculate prediction minus target. The weight gradient averages twice that error times the input; the bias gradient averages twice the error. Both updates use the same old parameters.

wnew=w−0.02 ∂L∂ww_{\text{new}} = w - 0.02\,\frac{\partial L}{\partial w}bnew=b−0.02 ∂L∂bb_{\text{new}} = b - 0.02\,\frac{\partial L}{\partial b}

At weight 1 and bias 0, the gradients are −40 and −14. One step gives weight 1.8 and bias 0.28. The average squared error falls from 54 to 24.0784.

Follow a number and inspect its error
STEP-BY-STEP WALKTHROUGH

Follow a number through a neuron.

1 / 4
INPUT2notebooks1
× WEIGHT2 × 36 credits2
+ BIAS6 + 28 credits3
OUTPUT8predicted credits4

Worked example · input 2, weight 3, bias 2 · separate from your playground

Start with 2 notebooks. The input tells the neuron how many items are in the basket.

MAKE THE MISTAKES VISIBLE

Why do we square the error?

Choose an example. Each square’s area represents its squared error.

Change the model
MODEL PREDICTION2.00
EXAMPLE PRICE8.00
SIGNED ERROR-6.00
SQUARE IT(-6.00)² = 36.00

The model predicts 6.00 credits too low. Squaring makes both negative and positive errors nonnegative. Doubling an error makes its square four times as large.

AVERAGE ALL FOUR SQUARES216.00 ÷ 4 = 54.00

This is the playground’s mean squared error. All four examples count, not only the one selected.

Linked to your playground: weight 1.00, bias 0.00. Squares share one scale: side length shows absolute error; area shows squared error.

Watch how it works One linear neuron: weight and bias
Notes, help and related ideas
My notes and reflection
CURIOSITY JOURNAL

What will you take away?

Keep a private reminder for yourself.

Loading your journal…

Add a short reflection

Open your journal or back it up.

Prerequisites and related ideas

Open the standalone neuron playground

CONNECTED IDEAS · SMALL PILOT CLUSTER

Find the idea you need

Use a connection to review, then return.

  1. Linear and affine functions

    A single neuron can review Linear and affine functions.

    The first neuron begins with input times weight plus bias. Comparing weight with slope and bias with a starting value makes that calculation visible.

  2. Neural networks

    Neural networks extends A single neuron.

    Trace one parameterized unit before composing layers. The XOR lesson then shows why nonlinear activations matter: stacking affine rules alone still gives an affine rule.

Open the full local map and resource list

11 concepts in this cross-subject pilot, not a complete curriculum graph. The existing AI lesson map and progress records remain separate and available below or through AI discovery.

Key terms: Neuron Weight Bias