A Single Neuron
An artificial neuron is weighted inputs, a sum, and a decision. Build one and watch it learn.
Objective
By the end of this lesson, you can describe what an artificial neuron computes and train one to learn a simple rule from examples.
What a neuron computes
An artificial neuron is a tiny math function, loosely inspired by brain cells. It is much simpler than a real brain cell. It does three things:
- Multiply each input by a weight (how much that input matters).
- Add them up, plus a bias (a starting nudge).
- Make a decision from the total. The simplest version says 1 if the total is above 0, otherwise 0.
That is the same idea as logistic regression from Module 11. A neural network is many of these, connected.
How it learns
The oldest learning rule is the perceptron rule, from the 1950s:
- Make a prediction.
- If it is wrong, nudge each weight in the direction that would have helped.
- Repeat over all examples until there are no mistakes (or you stop).
The size of each nudge is the learning rate.
Each full pass over the data is called an epoch.
What one neuron cannot do
Try teaching it XOR: output 1 when exactly one input is 1. Change the targets to 0, 1, 1, 0 and raise the epochs to 100. It never stops making mistakes. A single neuron can only draw one straight line between the 1s and 0s, and XOR needs two. This limit, pointed out in 1969, is why we stack neurons into layers.
A national example
Reflection
Discussion
Ask. Answer. Build together.
Loading…