nftool. Why thet test set chosen by matlab behaves better than my own test set.

1 visualizzazione (ultimi 30 giorni)
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
I trained using Matlab's with the ratio given above.
[net,tr] = train(net,inputs,response)
And split my data and feed 80% of the data into the inputs.
trainx = dataset(1:floor(S*0.8),1:batch_size*6);
trainy = dataset(1:floor(S*0.8),batch_size*6+1);
mytestx = dataset(1+floor(S*0.8):end,1:batch_size*6);
mytesty = dataset(1+floor(S*0.8):end,batch_size*6+1);
Then I get the test set chosen by matlab and my own test set and calculate their R^2
tInd = tr.testInd;% inputs chosen by matlab to be the test set
fitedy = net(inputs(:, tInd));
The matlab test set behaves way better than my own test set.
Some times, I even get 0.6 R^2 with my own test set getting minus R^2 values, could some one explain why?

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by