NARX neural network.

  • Follow


Hi all,

I am trying to develop a NARX neural network.  Setting up the network and training it is straightforward but I am running into trouble when I try to simulate values out of sample (ie one-step ahead forecast). One solution I am considering is to first train the network using in sample values and then simulate the entire network with all the observations including out of sample values.  After the network is simulated I can simply isolate the forecast from the simulated values.  This workaround, however, would fail if I don't don't have the out of sample target observations.  My question is how do i simulate the out of sample forecast for the narx network when i do not have the out of sample target observations??

Thanks for all your help,
Chandler


Here is my code for setting up and training the network

tt = length(x_total);

x = x_total(1:tt-1,:);  %Dependent variable
y = y_total(1:tt-1,:);  %Explanatory variable

lag = 2;

d1 = [1:lag];
d2 = [1:lag];

%The Target Variable
t = x(lag+1:end);
%The independent variable
p = y(lag+1:end);

narx_net = newnarxsp(p,t,d1,d2,20);

%the bayesian regulation training function
narx_net.trainFcn = 'trainbr';
narx_net.trainParam.show = 10;
narx_net.trainParam.epochs = 500;

Pi = [y(1:lag); x(1:lag)];
narx_net = train(narx_net,[p;t],t,Pi);

%Simulate the network -- In sample fitted values
yhat = sim(narx_net,[p;t],Pi);

yhat = cell2mat(yhat);
0
Reply Chandler 12/14/2009 7:40:22 PM


0 Replies
494 Views

(page loaded in 0.011 seconds)

Similiar Articles:













7/24/2012 7:56:20 AM


Reply: