Re: TIME SERIES PREDICTION NeuralNET
- From: "Greg Heath" <heath@xxxxxxxxxxxxxxxx>
- Date: 24 Nov 2005 19:42:58 -0800
raul wrote:
> Hi Sandra, you need to train with 750 data and test with othes 750
> data, because it`s necesary the simetry...
No.
Ntrn+Ntst = N, N = 1476 (see below).
The only constraint on Ntrn is that it is large enough to allow good
weight estimates. For an I-H-O MLP, there are Nw weights to estimate
where
Nw = (I+1)*H+(H+1)*O = O+(I+O+1)*H.
For ordinary training to convergence, you would want Ntrn >> Nw
(e.g., Ntrn ~ 10*Nw), hopefully leaving Ntst = N-Ntrn large enough to
obtain good estimates of the error on the test data.
If N is not large enough to yield satisfactory estimates for both
weights
and errors, other remedies like cross-validation or bootstrapping are
available.
See the comp.ai.neural-nets FAQ.
> Supergennarino wrote:
> >
> > time series prediction with backpropagation in neural network
> > toolbox in matlab
> >
> > I have a time series of 1500 data called: data.dat
> > Now we want to build the backpropagation that can predict x(t+6)
> > from the past values of this time series,
> > that is, x(t-18), x(t-12),x(t-6), and x(t).
> > Therefore the training data format is
> > [x(t-18), x(t-12), x(t-6), x(t); x(t+6]
> >
> > % From t = 1 to 1500, we collect 1000
You mean 1500
Z = [ x(1:1476)' x(7:1482}' x(13:1488)' x(19:1494)' x(25:1500)' ];
Xtrn = Z(1:Ntrn,1:end-1); ytrn = Z(1:Ntrn;end);
Xtst =Z(Ntrn+1:end;1:end-1); ytst = Z(Ntrn+1:end;end);
Hope this helps.
Greg
> data pairs f the above
> > % format. The first 500 are used for training while the others
> > % are used for testing.
> > %P= training vectors
> > %T= output vectors (of training)
> > %a= testing vectors
> > %s= output vectors
> >
> > load data.dat
> > P=zeros(1000,4);
> > T=zeros(1000,1);
> > aa=zeros(500,4);
> > s=zeros(500,1);
> > %training
> > P(:,1)=data(1:1000);
> >
> > P(:,2)=data(7:1006);
> >
> > P(:,3)=data(13:1012);
> >
> > P(:,4)=data(19:1018);
> >
> > T(:,1)=data(25:1024);
> >
> > %testing
> >
> > a(:,1)=data(1001:1500);
> >
> > a(:,2)=data(1007:1506);
> >
> > a(:,3)=data(1013:1512);
> >
> > a(:,4)=data(1019:1518);
> >
> > s(:,1)=data(1025:1524);
> >
> >
> > is it correct this code? and the subdivision of the data???
> > the vector of output 's' is correct??
> > must be s(:,1)=data(1220:1419);?
> > must be s(:,1)=data(1225:1424);?
> > and T???..
.
- References:
- Re: TIME SERIES PREDICTION NeuralNET
- From: raul
- Re: TIME SERIES PREDICTION NeuralNET
- Prev by Date: Re: Add two numbers using GUI
- Next by Date: Re: video capture from webcam/network-camera
- Previous by thread: Re: TIME SERIES PREDICTION NeuralNET
- Next by thread: Re: TIME SERIES PREDICTION NeuralNET
- Index(es):
Relevant Pages
|