Filter löschen
Filter löschen

how use all test indices for performance evaluation in matlab neural network?

1 Ansicht (letzte 30 Tage)
I want to do classification using Neural Network toolbox in matlab. I'm using commands (instead of NNtool GUI) I split my data set into 3 subsets via my own function(getIndices) : training, validation and test as follows:
trainRatio = 70/100;
valRatio = 15/100;
testRatio = 15/100;
[TrueClass,TrainIndices,ValIndices,TestIndices] = getIndices(someParams);
net = patternnet(hiddenLayerSize);
[trainInd,valInd,testInd] = divideind(Total_size,TrainIndices,ValIndices,TestIndices);
[net,tr] = train(net,inputs,targets);
tInd = tr.testInd;
tstOutputs = net(inputs(:, tInd));
tstPerform = perform(net, targets(:,tInd), tstOutputs)
after training network, I want to test it with test dataset. So i get the test indices like the code above and do use usual commands. everything goes well when I use the specified ratios for splitting dataset. for example if i have 6500 samples, i will have 4550 training samples,975 validation samples and 975 test samples. so tInd would be a 1X975 array. but when i change ratios, for example,
trainRatio = 50/100;
valRatio = 0/100;
testRatio = 50/100;
or other ratios, tInd does not change and it always remain the same size as before (1X975).
why this happens? is it any limitations or unwritten rule for data ratio?
I should write my own function for computing accuracy, so it's important for me to get all of the test indices specified,not a part of them.
(I know it seems a silly question but i'm really stuck and i need help :( )

Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by