Can I use divideind after using a dividerand in Neural Networks?

Hello, sorry if my english is bad. I'll try to explain as good as possible.
Here is the thing, in my neural network, I just generated from the input matrix, random values with "dividerand", and made 3 matrices as outputs of that function. Now, how could I use that output random values for training, evaluation and testing of my neural network? Can I use "divideind" and use those three matrices to train, evaluate and test? If so, how will be the syntax? I'm using this one "net.divideParam.testInd", but I guess I am wrong.
Here's the code for the three random value matrices:
[randtrain,randval,randtest] = dividerand(InReal',0.6,0.2,0.2)
Here is what I tried to do, but it gives me an error:
net.divideFcn = 'divideind';
net.divideMode = 'sample';
net.divideParam.trainInd = (randtrain');
net.divideParam.valInd = (randval');
net.divideParam.testInd = (randtest');
Error using network/subsasgn>network_subsasgn (line 528) net.divideParam.trainInd is not a vector.
Error in network/subsasgn (line 13) net = network_subsasgn(net,subscripts,v,netname);
Error in ANN_Avanzado_Base (line 31) net.divideParam.trainInd = (randtrain');
I will appreciate any answer, thank you for your time.

 Respuesta aceptada

If you did this in order to know which examples are in each division subset, it is not necessary because if you use the syntax [ net tr ] = train(net,input,target), the training record tr will contain that and other info.
My guess is that you should not have transposed randtrain.
Next time you have a question, illustrate it with one of MATLAB's neural net datasets:
help nndatasets
HTH
Thank you for formally accepting my answer
Greg

Más respuestas (0)

Categorías

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

Preguntada:

el 3 de Dic. de 2013

Respondida:

el 4 de Dic. de 2013

Community Treasure Hunt

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

Start Hunting!

Translated by