Perceptron

Revision as of 19:52, 25 April 2016 by rosettacode>Fwend (added perceptron draft task)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A perceptron is an algorithm used in machine-learning. It's the simplest of all neural networks, consisting of only one neuron, and is typically used for pattern recognition.

Perceptron is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

A perceptron attempts to classify input into two separate classes with the aid of a linear function. The inputs are each multiplied by weights, random weights at first, and then summed. Based on the sign of the sum a decision is made.

In order for the perceptron to make the right decision, it gets to train with input for which the outcome is known, so that the weights can slowly be adjusted until they start producing the right results.


The task

The website The Nature of Code demonstrates a perceptron by making it perform a very simple task : determine if a randomly chosen point (x, y) is above or below a line y = mx + b. Implement this perceptron and print an image of the result.


See also