Training a Neuron
Instead of picking weights by hand, let the neuron learn them. The perceptron rule: for each example, compare the neuron's output with the right answer. If it is wrong, nudge each weight by rate * error * input. After a few passes over the data the weights settle.
Examplepython
Quick check
In the learning rule, what happens when the neuron's output already matches the target?
Your turn: write the code
Train the neuron on the AND gate data and print its four outputs as a list.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.