perceptron-0.1: The perceptron learning algorithm.

Safe HaskellSafe-Inferred



An implementation of the perceptron learning algorithm for supervised binary linear classification.

A binary classifier maps so-called feature vectors to Boolean values. In the case of linear binary classification the decision on what Boolean a vector is mapped to is based on the value of a linear combination of the vector's components. The perceptron is an online algorithm for learning such a linear mapping from a set of training data.

Training data are provided as samples consisting of a feature vector and the Boolean it should be mapped to. Hence, the perceptron implements a form of supervised learning. Only if the training vectors are linearly separable, the perceptron algorithm is guaranteed to terminate.



pla :: (Num a, Ord a) => [([a], Bool)] -> [a] -> BoolSource

Return a classifier that agrees with the given list of classifications. Only terminates if the given classifications are linearly separable!