'Perceptron (SLP, single-layer averaged perceptron) is a simple artificial neural network,
a supervised learning method sometimes used for i.a. part-of-speech tagging.
Documents are classified based on the neuron that outputs the highest weight
for the given inputs (i.e., document vector features).
A feature is taken to occur in a vector (1) or not (0), i.e. BINARY weight.'

def __init__(self, train=[], baseline=MAJORITY, iterations=1, **kwargs):

    self._weight = defaultdict(dict)
    self._iterations = iterations
    self._iteration = 0
    train = list(train)
    train = chain(*(shuffled(train) for i in range(iterations)))
    Classifier.__init__(self, train, baseline)
