Re: TIME SERIES PREDICTION NeuralNET




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???..

.



Relevant Pages

  • Re: TIME SERIES PREDICTION NeuralNET
    ... > time series prediction with backpropagation in neural network ... > Therefore the training data format is ... > %T= output vectors ...
    (comp.soft-sys.matlab)
  • TIME SERIES PREDICTION NeuralNET
    ... I have a time series of 1500 data called: ... Now we want to build the backpropagation that can predict xfrom ... Therefore the training data format is ... %T= output vectors ...
    (comp.soft-sys.matlab)
  • Re: examples for multiplication
    ... signals or multiplication of two time series. ... for additions, like two weights adding, but I can't think of examples ... How about kinetic energy equaling the mass times the ...
    (sci.physics)
  • Re: examples for multiplication
    ... signals or multiplication of two time series. ... for additions, like two weights adding, but I can't think of examples ... How about kinetic energy equaling the mass times the ...
    (sci.physics)
  • Re: weighted average time series
    ... How about normalizing all of them to have a maximum value of 1? ... You can obtain a set of weights this way, but I don't know if this simple solution would work for you. ... I want to combine them together to construct a weighted-average time series. ... I thought this would be a least-squares problem, but I can't seem to get it in the right form. ...
    (comp.soft-sys.matlab)