percepTron

A perceptron is the simplest type of an artificial neural network. Invented in the fifties by Frank Rosenblatt, it was one of the earliest neural network models and is in essence a linear classifier.

The intension of the perceptron is to model a set of input neurons which supplies a weighted sum of inputs to an output neuron. If this sum is greater than some adjustable threshold value, the value 1 is generated in the output neuron (otherwise the output neuron takes on the value of 0).

A perceptron entails only one layer of connections since the inputs are connected directly to the output (subsequently a perceptron has two unit or node layers). The nodes are binary, that is they can only take on the value of either 1 or 0. Consequently, the patterns that one wishes to classify must be binary coded.

The inputs and connection weights are typically real values. If an input, xi, causes the the perceptron to fire, the weight, wi, will be positive; if the feature xi inhibits the perceptron, the weight, wi, will be negative.

A perceptron must be trained to give the right classification. Every input pattern generates a specific output signal, 1 or 0, and an untrained perceptron cannot be expected to get this classification right. Instead, one must learn the perceptron the right classification by altering its weights according to the following set of simple rules:

Following the reasoning of Helge Malmgren, the Java program percepTron is a model of the simplest imaginable configuration, a perceptron with two inputnodes and one outputnode:

The machine has four possible inputvectors: (1,1), (1,0), (0,1) and (0,0). One can think on different ways to classify these. One possibility is to model the logical function representing AND by assigning the output (1) to the input (1,1) while the other inputs generates the output 0. ”x and y” is true only if both x and y are true – represented here by (1,1) which generates the output (1).

The purpose of the program is to generate a model of a perceptron with randomized weights. In manual training mode, the user can specify the inputs (true or false, representing 1 and 0) and manually adjust the weights until the desired output (true or false) is achieved. This resulting state can be saved to file and obtained at a later occasion. In automatic training mode, the user specifies the desired classification of the input vector and leaves the training to the program which performs a set of automated training sessions.

Please note that the program is in a very early stage of development, and for the moment only the manual training mode is implemented. Updates and version history are noted below as the development progresses. Pleas feel free to download and examine the source code and contribute with suggestions and ideas.

Contact: andreas [at] qualia [dot] se

Permalink: http://www.qualia.se/software/perceptron/

Further reading:

  • Helge Malmgren: Inlärning och minne i neurala nätverk
  • Homepage of Helge Malmgren
  • Wikipedia

Download zip-archive:



Have your say

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>




Safari hates me