MATLAB: Is the testSet (size) equal to the dataSet after installing net.divide​Param.test​Ratio to 15/100.

divideparamneural networkneural networkssplitting datatestsettrainingset

Best
I'm using a feed-forward neural network. Here I want to split my dataset into 3 pieces. A training, validation and test-set.
Via the use of a feedforwardnet(), I can install this quite easy by the net.divideParams. Thus for example I set these on :
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
But when I test my network y = net(x); I see that y contains my whole dataset and not 15% of it.
Thus, if my dataset contains 3000 data points, I would expect that Y contains 450 data points.
Can someone explain this to me? Can I relay on Y, or should I create my own independent data set because my test set, isn't allowed to use any train or validation data…
Kind regards
Dieter

Best Answer

The separation of y into trn/val/tst subsets is accomplished via the indices in the training record tr.
[ net tr y e ] = train(net, x, t );
% y = net(x)
% e = t - y
Why don't you type, WITHOUT SEMICOLON
tr = tr
and CAREFULLY check out all of the goodies that tumble out (;>)
Hope this helps.
Thank you for formally accepting my answer
Greg