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.

 채택된 답변

Greg Heath
Greg Heath 2013년 12월 4일
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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2013년 12월 3일

답변:

2013년 12월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by