is following matlab code for calulating mse for k-fold cross validation neural network is correct
1 view (last 30 days)
Show older comments
output123=net(trainMatrix{i}(:,1:2)'); errors=gsubtract(trainMatrix{i}(:,3)',output123); performance=perform(net,trainMatrix{i}(:,3)',output123); trainTargets = trainMatrix{i}(:,3)'.*tr.trainMask{1}; testTargets = trainMatrix{i}(:,3)' .*tr.testMask{1}; trainPerformance = perform(net,trainTargets,output123); testPerformance = perform(net,testTargets,output123); test(k)=testPerformance;
1 Comment
Greg Heath
on 15 Jul 2015
PLEASE FORMAT !!!
No one is going to check your code unless you apply it to MATLAB example data for comparison
help nndatasets
doc nndatasets
See for example
Hope this helps.
Greg
Answers (0)
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!