Divideind not working in r2014a

I have data file of 200*62 and i have to split it for training validation and testing (not randomly). So im using divideind function but not able to run the code as im having this error. Looking forward to some help . Thanks in advance here is my code :
inputs = input;
targets = out_final; hiddenLayerSize = 10;
net = patternnet(hiddenLayerSize);
trainInd = 1:100;
valInd = 101:150;
testInd = 151:200;
Q=200;
net.divideFcn='divideind'; %%%here is the error line 21
net.divideParam.trainInd=trainInd;
net.divideParam.valInd=valInd;
net.divideParam.testInd=testInd;
% Train the Network
[net,tr] = train(net,inputs,targets);
% Test the Network
outputs = net(inputs);
errors = gsubtract(targets,outputs);
performance = perform(net,targets,outputs);
% View the Network
view(net)
Error message :
Error in network/subsasgn (line 13) net = network_subsasgn(net,subscripts,v,netname);
Error in div (line 21) net.divideFcn='divideind';

6 comentarios

Greg Heath
Greg Heath el 6 de Feb. de 2015
Editada: Greg Heath el 6 de Feb. de 2015
How many classes?
What are the dimensions of the input and target?
size(inputs) = ?
size(targets) = ?
cell or double?
I ran your code using the iris data set without error.
Try all of the divide functions to see if any of them work.
Hope this helps.
Greg
Sandeep
Sandeep el 6 de Feb. de 2015
hi, thank you for your reply.
input is 62*200
targets is 5*200
5 classes totally
All other divide functions were working Except "divideind"
divideind also worked in an other system but not in mine. This is Bizzare
Greg Heath
Greg Heath el 19 de Feb. de 2015
Hi ,
Thank you for your help. It was really helpfull and i could fix my problem. My another doubt is that is it possible to get value of performance greater than 1?
In my code i'm getting values greater than 1. Can u please me suggest me if i'm right or wrong? Code for you reference is in the below link.
Thanks Sandeep
>> net = patternnet;
performFcn = net.performFcn
performFcn = crossentropy
>> help crossentropy
doc crossentropy
type crossentropy
!!!!!!!!!!!!!!!!!!! BUG !!!!!!!!!!!!!
The documentation does not give the formula!
Search NEWSGROUP and ANSWERS using
greg crossentropy
to find which formula is being used.
Hope this helps.
Greg
Sandeep
Sandeep el 23 de Feb. de 2015
Thank you so much. Also can you tell me if my code also performs validation and testing on the divided indices?
Or do i have to separately use a different function to perform validation and testing?
Thanks in advance
Sandeep
Greg Heath
Greg Heath el 24 de Feb. de 2015
Editada: Greg Heath el 24 de Feb. de 2015
No. It is automatic. You can figure it yourself from the training record if you first type, without semicolon
tr = tr
Hope this helps.
Greg
Sandeep
Sandeep el 25 de Feb. de 2015
Thank you so much for the response. really really helpful.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

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

Preguntada:

el 4 de Feb. de 2015

Comentada:

el 25 de Feb. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by