The perceptron learning procedure:
A sample:
Click anywhere to learn the point to the perceptron visualized by the line and the vector (which represents the weight vctor of the perceptron.
If you simply click, the desired class of the point will be considered 1, if you click while holding down the shift key, the desired class will be considered 0.
By using the perceptron learning procedure, it is possible to learn a perceptron to implement an AND gate.
A sample:
x1 | x2 | desired outcome |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Click anywhere on the space to learn a new point. The code iterates through the truth table of an AND gate to select points to learn. It does NOT use the point clicked !!!
As a result, when a point is choosen which is already correctly classified nothing will be happening.
As feedback to which point is choosen, the point will grow and shrink
Green means class 0 and orange means class 1. The border color signals the desired class and the fill color signals the effective class. So a dot with a green border and an orange fill means the dot should be classified to class 0 but is currently classified into class 1.
By using the perceptron learning procedure, it is possible to learn a perceptron to implement an OR gate.
A sample:
x1 | x2 | desired outcome |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Click anywhere on the space to learn a new point. The code iterates through the truth table of an OR gate to select points to learn. It does NOT use the point clicked !!!
As a result, when a point is choosen which is already correctly classified nothing will be happening.
As feedback to which point is choosen, the point will grow and shrink
Green means class 0 and orange means class 1. The border color signals the desired class and the fill color signals the effective class. So a dot with a green border and an orange fill means the dot should be classified to class 0 but is currently classified into class 1.
Now try it yourself: image a line and try to learn this line to the perceptron.
Image a line and click on both sides of the imagined line. Hold down the shift key to learn points with a desired class 0. If you don't hold down the shift key, the point will have a desired class of 1.
Use the slider to change the learning rate.