Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: number of hidden layer nodes in neural network fitting function
Replies: 1   Last Post: Aug 16, 2013 7:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Greg Heath

Posts: 5,950
Registered: 12/7/04
Re: number of hidden layer nodes in neural network fitting function
Posted: Aug 16, 2013 7:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"FRUIT" wrote in message <ktvpoa$hrt$1@newscl01ah.mathworks.com>...
> In am using neural network fitting function with four input neuron one hidden layer/the matlab default/ and one output neuron for prediction. I start using 10 hidden layer neurons.
> 1. My problem is how can measure the performance


help fitnet

doc fitnet

[X,T] = simplefit_dataset;
net = fitnet; % (no semicolon) to see the default properties
rng(0)
[ net tr Y E ] = train( net, X, T);
output = Y; % Y = net(X);
error = E; % E=T-Y
perf = mse(E)
trainingrecord = tr % (no semicolon) to see what it contains

stopcrit = tr.stop
numepochs = tr.num_epochs
bestepoch = tr.best_epoch
MSEtrn = tr.best_perf % = tr.perf(bestepoch+1)
MSEval = tr.best_vperf
MSEtst = tr.best_tperf

and when to stop increasing the hidden layer nodes?

Search for examples of my code in the NEWSGROUP
and ANSWERS

> 2. In training the network; when shall I stop, am not clear on the performance metrics.

The defaults will choose when to stop. See stopcrit above to find the cause.

> 3. How can I test the nnfit for new data?

newoutput = net(newinput);

Hope this helps.

Greg



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.