How to determine input and target data for classification in neural network

Hi all,
I want to classify using neural network toolbox. I have input matrices data (7 input x 125 samples) and target data (5 output x 125 samples). I have scaled my input data that have 125 samples into 5 class. Row 1:25 as class A, row 26:50 as class B, row 51:75 as class C, row 76:100 as class D, and row 101:125 as class E. I want to use 'trainlm' training. I am confuse to write input and output in Matlab.
Thanks in advance for any and all help

 Respuesta aceptada

%size(input) = [ 7 125 ]
%size(target) = [ 5 125 ]
target = zeros(5,125);
target(1,1:25) = ones(1,25);
...
target(5, 101:125) = ones(1,25);
Use patternet.
Hope this helps
Thank you for formally accepting my answer
Greg

2 comentarios

Mind to know can I use back propagation instead of patternet?
What do you mean by backpropagation ... fitnet?
Fitnet is for regression and curve-fitting. Targets are real-valued and trainlm is used.
Patternnet is for classification and pattern-recognition. Targets are columns of eye(c) where c is the number of classes or categories. Trainscg is used because targets are binary.
Except for that and plotting, the algorithms are equivalent (both call feedforwardnet).
Why do you have a problem with that?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 19 de Jul. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by