Rosenblatt's perceptron in action
Rosenblatt's perceptron. Have you ever seen it while learning? (:
What
Rosenblatt’ perceptron training using a couple of examples from the iris datset.
The network learns how to classify data points as positive (label=1) or negative (label=-1).
How
The neural network learns in the following steps:
Input (x) enters the network (blue circle);
Weights (w) are randomly initialised (salmon circle);
Net input is calculated by summing up the product of each weight by its input;
The threshold function converts the net input into 1 or -1.
1 if the net input is greater than zero, -1 otherwise;The output of the threshold function (p) is compared with the actual label (y).
The error is calculated as the difference between the two.The network weights are updated using updating rule: w + [eta*(y - p) * x], where eta is the learning rate chosen for the task (0.1 in our case).
The steps are repeated for the second examples. And will be repeated for many more for a good learning
Geek note1: All weights are updated simultaneously, i.e. we update all the weights before predict the label for each example.
Geek note2: bias = 0 for simplicity.