Hi all,
I am trying to build up a NN model in Matlab 2008a.
I am dividing the dataset using the following command
net.divideParam.trainRatio = 0.6;
net.divideParam.valRatio = 0.2;
net.divideParam.testRatio = 0.2;
Now after training, I want to have those datasets (_i.e._ target and network output only) that were used for training, testing and validation in three different files so that I can manually do the regression analysis. Can anyone please suggest the suitable command to so this.
Thanks for your kind help.

3 件のコメント

Greg Heath
Greg Heath 2011 年 12 月 13 日
What do you mean by "regression analysis" ?
What quantities do you want that are not available via the output of TRAIN ?
Greg
Arijit
Arijit 2011 年 12 月 13 日
Hi Greg,
By regression analysis, I want to mean that after performing TRAIN, I can see the plots of target vs output for TRAIN, TEST and VALIDATION datasets. I guess those values (target and output) are getting stored at "tr". Now I want to have those values extracted from "tr" to three different files and plot that graph manually. I want to do it just because definitely there will be some values for "train dataset" which will be out of the user defined performance limit. To delete or identify those, I want to have this information.
Thanks for your information and help. Looking forward for your valuable comment.
Arijit
Arijit
Arijit 2011 年 12 月 14 日
Hi Greg,
I got the answer of my previous question. If my output is "Y", then we can get the train output from "Y(tr.trainInd)".
Thanks
Arijit

サインインしてコメントする。

 採用された回答

Luca Cavazzana
Luca Cavazzana 2011 年 12 月 13 日

1 投票

after calling train you get as second input argument the training record tr. The attribute testMask{1} contains a matrix (the same size of the input matrix) whose value are 1 if the element is in the training set, NaN otherwise. You can find indices this way:
[net, tr] = train(net, input, targets);
testInd = find(~isnan(tr.testMask{1}(1,:)));
inputTest = input(:,testInd);
targetTest = target(:,testInd);
In the same way, trainMask{1} and valMask{1} gives you the training and validation mask.
edit: instead of the whole testInd=find(...) thing, I forgot there's already the attribute tr.testInd

1 件のコメント

Arijit
Arijit 2011 年 12 月 14 日
Thanks Luca.
I did using tr.trainInd and got the desired output.
Arijit

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File 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