Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
matlab feedforward parameters values selection

Subject: matlab feedforward parameters values selection

From: Kfupm engsub

Date: 1 Feb, 2012 17:30:10

Message: 1 of 1


I have a project in short term load forecasting using neural networks.

I am using newff matlab function as follows:
% normalization
[pn,ps]=mapminmax(p); % p is the input data matrix (training)
[tn,ts]=mapminmax(t); % t is the output data matrix (training)
net=newff(minmax(pn), [5 1], {'tansig','purelin'},'trainbr'); = 50; % The result is shown at every # epoch = 0.05; % Learning rate used in some gradient schemes
net.trainParam.epochs = 1000; % Max number of iterations
net.trainParam.goal = 1e-3; % Error tolerance; stopping criterion
net = init(net);
% train network
[net,tr,Y,E] = train(net, pn, tn);
% To simulate the training data
an = sim(net,pn);
% denormaliz
a = mapminmax('reverse',an,ts);
% load forecasting
pt1n = mapminmax('apply',pt1,ps); % inputs for forecasting
pf1n = sim(net,pt1n);
pf1 = mapminmax('reverse',pf1n,ts); % forecasted load consumption

where p is my inputs data matrix which contains the factors that affect the load

consumption like temperature, holidays, load at previous days, weekends……..etc and

they are 20 inputs and t is my output data matrix which is the load consumption. My

question is how can I select the above parameters in the code like Learning rate, max

number of iterations, error, epoch……….etc My training data is hourly inputs from 1985

to 1989 meaning that it is 43656 points

So, my inputs matrix is 20 by 43656 in training. My output matrix is 1 by 43656 in

training. My input testing matrix is the hourly inputs for year 1990 which is 20 by 8760.

I want to predict the hourly load consumption for year 1990.

From reading many papers, as I understood, that selecting these values depends on

the application and number of inputs. But, what does this mean “depends on the

application“. Are there guidelines or “key” to how to start selecting these values. Or it

may be selected to some limits if the number of training data is in a specified range

What I have selected is random numbers and the results are somehow reasonable in

some points but not well in other points. Also, it sometimes takes long time to train

(to 10 minutes)

So, in summary:

I want a key to how to start selecting these values. I am sure it is not randomly

selection as I have done. I know that there is no rule to do that but at least there are

steps or guidelines.

Also, I am not restricted to use newff, if there is simpler and better NN model, I can

use it.


Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us