Since we have 3 different classes for Classification, we create a Perceptron object for each class. Each Perceptron has score and update functions. During training, for a set of input features it takes the score from the Perceptron for each label and assigns the label with max score(for all the data instances). It compares the assigned label with the true label and decides whether or not to update the weights (with some learning rate).
Check the source [code](/blob/master/classifier/linear_model.py) for more details on the implementation of Perceptron Classifier.
Check the source [code](/classifier/linear_model.py) for more details on the implementation of Perceptron Classifier.