필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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 :( )

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by