← Back to the track

Learn machine learning · part 5 · session 1

One neuron

The neuron adds up its inputs, each scaled by its own weight, then pushes that one total through a function that folds any number, however large, into the range 0 to 1. This session redraws the arithmetic you already did in 4.1 as the diagram everyone else draws, and names every part of it by what it does.

After this session you will be able to point at any part of a neuron diagram and say what that part does in arithmetic.

neuron.oneSession 5.1About 25 minutesYour check: demonstrate the idea yourself

The gate: all five labels right within two submissions, with the sum accepted on the first or second attempt.

01 · The question

In 4.1 you moved two and a and watched a line move across a scatter. This session redraws that same arithmetic as a diagram: two inputs, two weights, one bias, a sum, and a squashing step. Not one number changes. Only the picture does.

The word is borrowed from biology, and the resemblance stops at the borrowing, so I name every part by what it does arithmetically. Before you touch the diagram, decide what happens to the output if I double both weights and leave the bias where it is.

The neuron, set by hand

computed in this browser

w = (0.80, −0.60), b = 0.10, x = (1.50, 2.00), sigmoid on the output. I chose these numbers by hand; nothing on this page learned them from data.

02 · Predict

The two inputs are 1.50 and 2.00 and the two weights have opposite signs. Work out both products in your head first, then answer.

Before anything runs

Double both weights, bias stays at 0.10. The output will:

Double both weights, bias stays at 0.10. The output will:

Choose something first.

03 · Try it

1 · read the wired diagram

How one number leaves a neuron

computed in this browserthe fixture on this page

Two inputs arrive, each with its own value.

Multiply on each wire, add everything at the node, squash once.

Move through the nodes with the keyboard or tap one. The panel under the diagram prints that node's arithmetic, and the squashing step is the one the track calls the . There is no wrong input here.

z = 0.80 × 1.50 + (−0.60) × 2.00 + 0.10 = 0.1000

Read the diagram as a list
  1. 1. weight one, 0.80, times input 1, 1.50, gives 1.2000
  2. 2. weight two, −0.60, times input 2, 2.00, gives −1.2000
  3. 3. the bias, 0.10, is added
  4. 4. the sum is 0.1000
  5. 5. the sigmoid of 0.1000 is 0.5250

The three controls from 4.1

computed in this browser
-2.0 to 2.0
-2.0 to 2.0
-2.0 to 2.0
the input xz = 0

The line is where the sum is zero. At the current setting the sum at the input x is 0.1000 and the output is 0.5250. This neuron was set by hand, not fitted to these points, so the line is not expected to separate them.

200 points from blobs(200, seed 7), synthetic. The cross marks the neuron's input, not a data point.

Show the numbers
Values shown in the figure above
whatvalue
weight one0.80
weight two−0.60
bias0.10
sum z0.1000
output0.5250

2 · compute the sum by hand

to two decimals, within 0.01

Attempts: 0

3 · double the weights

This sets the controls to 1.60 and −1.20 and leaves the bias at 0.10. The engine recomputes the sum and the output.

computed in this browser

4 · name the five positions

Name the five positions

Eight terms, five positions. Two of the terms belong to neither this diagram nor this session.

Every position needs a term first.

Submissions: 0

5 · one line about biology

One of these four is supported by what is on this page. The others are not.

Which statement about the biological analogy is supported

This is an arithmetic analogy, not a claim about neurons.

Ask for a hint

Rungs open as you run the session, not as time passes. You have run it 0 times.

1. A question: available after 3 evaluated runs.

2. A narrowing: available after 5 evaluated runs.

3. A worked fragment on a different neuron: available after 7 evaluated runs.

4. The answer: available after 9 evaluated runs.

04 · Compare

05 · Check your understanding

Your check: an outcome you produce

not yet

All five labels correct within two submissions, and the sum z accepted on attempt one or two. The biology answer is recorded and does not gate.

Not met yet. Keep working the session.

  • Labels: not submitted yet
  • The sum z: not accepted yet

Save your takeaway

Your takeaway

Edit it into your own words, or keep the line as it is.