Neuron receives and analysis data from dendrites. It performs simple biological tasks to support thinking processes in brain. Perceptron is artificial representation of it. To understand the artificial concept, image below shows real neuron described by math.
- X
- 1-dimensional matrix of input values
- W
- 1-dimensional matrix of weights
- Θ
- bias
Now, we know how perceptron is build. Next thing we need is formula to generate output. Output is discrete and unipolar -> {0,1}.
Output will be produced by this formula:
To understand it well, let's simplify it. We can now set and . Now, formula will look like this:
From matrix multiplication rules we know that will return integer. Whether this integer is less then 0 or more, we can classify this data sample to class 0 or 1.
Changing value of Θ will move our red hyperplane from (0,0). This will help to divide data into classes if we needed so:
As we already know, X represents inputs - they change all the time. W and Θ are internal components of perceptron. So, learning process will be based on changing values of them. W will point where one class is and will define angle of hyperplane, Θ it's distance from (0,0).
When we train our perceptron, we use supervised training, which means we know right answers for data we provide to perceptron. If guess of perceptron is right, we continue with training, but when it is wrong, we want it to calibrate W and Θ values.
- W'
- new vector
- W
- old vector
- d
- desired output {0,1}
- y
- perceptron output {0,1}
- alpha
- training factor
- X
- vector of inputs
When perceptron training process is done, when reviewing 3D scatter plot, plane from vector and point (W and Θ) should look like this:
Provide path to train set and test set. Both should:
- be .csv files
- contain same number of columns in the same order
- have last column containing class
Load data. If files were read correctly, input fields should appear green.
When data has been loaded properly, next step is to set value of alpha. Then, you can start process of training perceptron with train set data. This is all done by clicking "Train perceptron" button. 3D scatter plots should appear. They represent every 3D projection of all data dimensions. For example, if your data has 4 numeric columns, plots should appear.
On these 3D plots, you can observe how W plane is changing due to learning process (including Θ). Currently computed data sample is highlighted with red.
When learning process is done, you can test accuracy of trained perceptron with test set data. Scores of tests will be shown afterwards.
If you are happy with scores of perceptron classification, here you can classify unclassified samples. Csv format required.