The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 6,387
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$>...
> 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
[ 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

> 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.


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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.