How to use ftinet to create neural network

1 view (last 30 days)
Das Bably
Das Bably on 21 Nov 2013
Answered: Greg Heath on 1 Dec 2013
Hi, I am doing a regression analysis using matlab Neuralnetwor for the verson2009, where I need to correlate 3 input data sets of(3*10) matrix with a target data set of (1*10)matrix. At first I have tried to use nntool and nftool. Now I am trying to do using command line by creating network with fitnet, but I am getting an error "??? Error using ==> load Unable to read file InputNeg: No such file or directory. Error in ==> math1 at 14 inputs = load ('InputNeg');" When I am trying to load the Input and Target Mat file. Then I tried to write the values directly in the code then I got the error "??? Undefined function or method 'fitnet' for input arguments of type 'double'. Error in ==> math1 at 17 net = fitnet(hiddenLayerSize);" Please If any one have any Idea about this, suggest me what should I do. Thanks in Advance
  3 Comments

Sign in to comment.

Accepted Answer

Greg Heath
Greg Heath on 1 Dec 2013
This is a poor example: N = 10 is not large enough to obtain robust practical solutions. With [I N ] =size(x) = [ 3 10 ], [O N ] = size(t) = [ 1 10], Ntst = round(0.15*N) = 2, Nval = Ntst =2, Ntrn = N-Nval-Ntst = 6, Ntrneq = Ntrn*O = 6 is the number of training equations.
With H hidden nodes, the number of unknown weights is Nw = (I+1)*H+(H+1)*O. A sufficient condition for a robust practical solution is Ntrneq >> Nw. However, Notice that, Ntrneq > Nw only when H <= Hub where Hub = -1+ceil( (Ntrneq-O) / (I+O+1)) = 0.
There is quite a bit more that I could say about this poor example. However, the main points are
1. I was able to run your code
2. Be careful of overfitting (H too large and/or N too small) with your real data set.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!