This program implements a
Perceptron
finding a line to separate two groups of points.
Note the video has a screenshot of the exercise as it appears in an M.Sc. course. You do not have access to this course.
See the exercise below instead.
On each run, there is a set of points that is linearly separable.
We achieve this by defining a random (blue) line on each run.
Points above the line (green) are one class (output should be 1).
Points below the line (pink) are another class (output should be -1).
Starts with random perceptron, i.e. random (white) line.
Perceptron learns by getting output wrong to change until all outputs are right.
Credits
Port of Perceptron from here
from "The Nature of Code"
(by the "Coding Train").