How can cross validate neural networks
Ältere Kommentare anzeigen
"I read the previous question and answers but I don't understand well. if I have 18 samples with 2 hidden layer and in each run inputs and targets have 17 samples(one more out) and target p is the which is out,is it correct to... net = newfit(inputs,targets,2); [net,tr] = train(net,inputs,targets); outputs = sim(net,target)'; outputs1 = sim(net,targetp')'
Akzeptierte Antwort
Weitere Antworten (1)
Greg Heath
am 19 Mai 2012
1. There is an error in the NEWFIT documentation. 'linear' is not a valid option; replace with 'purelin'.
2. NEWFIT calls NEWFF. Both crash when 'remconstantrows' is an explicit input.
3. To run NEWFIT or NEWFF with explicit defaults:
a. Use 'purelin' instead of 'linear'.
b. Delete both occurrences of 'remconstantrows'. Before creating the net you can remove input and output rows that have zero variance.
4. What version of the NNTBX do you have? Both NEWFIT and NEWFF are now obsolete.
5. >> help newfit
newfit Create a fitting network.
Obsoleted in R2010b NNET 7.0. Last used in R2010a NNET 6.0.4.
>> help newff
newff Create a feed-forward backpropagation network.
Obsoleted in R2010b NNET 7.0. Last used in R2010a NNET 6.0.4.
6. If you have a recent version of the Toolbox, use FITNET for regression and curvefitting and PATTERNNET for classification. (help ... and doc ...)
Hope this helps.
Greg
1 Kommentar
Greg Heath
am 19 Mai 2012
If you want all defaults except for dividerand, you can create the net first, then override the defaults.
net = fitnet(P,T,2);
net.divideFcn = dividetrain;
Greg
Kategorien
Mehr zu Installing Products finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!