MATLAB Answers

How to the coding should be for a neural pattern recognition & classification of 3 input and 1 binary output?

3 views (last 30 days)
Andrew Ang
Andrew Ang on 19 Oct 2018
Edited: Andrew Ang on 22 Oct 2018
I am doing a study on Neural Pattern Recognition and Classification. My idea is, with 3 numerical entry as input, the Neuron Network function will classify these entries with a binary output of either 1 or 0. Please, can someone guide me with the MATLAB coding?

  0 Comments

Sign in to comment.

Accepted Answer

Greg Heath
Greg Heath on 21 Oct 2018
Edited: Greg Heath on 21 Oct 2018
Typically, c-class Classifiers of I-dimensional inputs are trained with input and target matrix sizes
[I N ] = size(input)
[c N ] = size(target)
where the target columns are 1/0 c-dimensional unit vectors.
For example, with three distinct classes the targets are the column vectors of the 3-dimensional unit matrix:
[ 1 0 0 ]
[ 0 1 0 ]
[ 0 0 1 ]
Using SOFTMAX as the output function, the outputs will be unit sum non-negative vectors and are interpreted as the a posteriori probabilities of the input belonging to each class.
The classification is determined by the largest a postiori probability:
For example,
[ 0.70 0.40 0.11
0.10 0.05 0.66 ===> [ 1 3 2 ]
0.20 0.55 0.33]
THE EXCEPTION IS WHEN THERE ARE ONLY 2 CLASSES. Then, only one output in [0 1 ] is necessary. The other output is obtained by subtracting the output from one.
Hope this helps.
*Thank you for formally accepting my answer*
Greg

  0 Comments

Sign in to comment.

More Answers (0)


Translated by