neural network error Undefined function or variable 'network'?

4 views (last 30 days)
Hi all, There is an error while I used neural network toolbox. I wrote a script, but when I start running it I getting
Undefined function or variable 'network'.
And this what I do
clear
load('Metdata','METData')
training_set=METData(1:5088,:);%specify training set
shuffling_inputs=training_set(randperm(5088),1:4);%randomize the input matrix
load('SLR');
target_set=SLR(1:5088,3);%sea level residual targrt set (1-7)
testing_set=METData(5089:7296,:);%specify testing set (1-7)
testing_target_set=SLR(5089:7296,3);%specify testing set (8-11)
[pn,ps]=mapminmax(training_set');%Normalize the input and output -1,1
[tn,ts]=mapminmax(target_set');
net = feedforwardnet(10);
how can I solve this problem?
thank you all.

Accepted Answer

Greg Heath
Greg Heath on 3 Nov 2015
It is clear that you do not understand how the MATLAB toolbox functions work.
0. MATLAB DOESN'T USE UPPER CASE. I AM USING IT FOR EMPHASIS.
1. FITNET is used for regression/curve-fitting
2. PATTERNNET is used for classification/pattern-recognition
3. Both call FEEDFORWARDNET automatically
4. INPUT(x) and TARGET(t) sets are used in the function TRAIN.
5. TRAIN automatically divides the data into training/validation/testing subsets in the
ratio 0.7/0.15/0.15
6. It is advisable to initialize the RNG before training so that your results obtained
from automatic random data division and random initial weights can be reproduced.
7. The syntax
[net tr y e ] = train(net,x,t);
yields the OUTPUT y = net(x), ERROR e = t-y,TRAINING RECORD tr and TRAINED NET net.
8. I have posted many examples. Search the NEWSGROUP and ANSWERS using
greg fitnet tutorial
and
greg fitnet
Hope this helps.
Thank you for formally accepting my answer
Greg
  5 Comments
Greg Heath
Greg Heath on 5 Nov 2015
Your original post used FEEDFORWARDNET appropriate for regression & classification. Is this the same problem? If not, you should have started another thread with NARNET in the title.
Of course I have tutorial posts on NARNET.
All you had to do was search BOTH the NEWSGROUP and ANSWERS using
greg narnet
and
greg narnet tutorial
Although my explicit tutorials (TUTORIAL in the title) are in the NEWSGROUP, search both forums with and without the term tutorial.
Hope this helps.
Greg
Lilya
Lilya on 8 Nov 2015
ok now its clear I will study your tutorial perfectly. the data which I work with is atmospheric parameters to estimate the sea level variations (actually the rule of each parameter in the sea level) to predict the time series autoregrissin (NARX) is more convenient to use

Sign in to comment.

More Answers (1)

dulaj sanjaya
dulaj sanjaya on 17 Jul 2017
I got the same error. I solved it.The reason is you haven't verified license. if you are using linux try to install as root user.
sudo ./install
After successful installation you will be asked to verify license.

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!