From: Maitha on
Hi all,

I am trying to develop an Adaptive Neural Network, which has 4 inputs and one output. The network should predict for next year (365 days).

Training data sample : 4383
Testing data : 365

I have used newfftd function as follows:
net = newfftd(pn,tn,[0 1], 5)


% pn : normalized input patterns, [-1, 1]
% tn : normalized output [-1,1]

Based on what the delay input should be sit up? Should be [0 365] because I want to predict incoming 365 days?

ps : Matlab (R2008a) is used

Thanks in advance
Maitha
From: Greg Heath on
On Jul 10, 7:33 am, "Maitha " <maitha_...(a)hotmail.com> wrote:
> Hi all,
>
> I am trying to develop an Adaptive Neural Network,  which has 4 inputs and one output.  The network should predict for next year (365 days).
>
> Training data sample : 4383
> Testing data : 365
>
> I have used newfftd function as follows:
> net = newfftd(pn,tn,[0 1], 5)
>
>  % pn : normalized input patterns, [-1, 1]
> % tn : normalized output [-1,1]
>
> Based on what the delay input should be sit up? Should be [0 365] because I want to predict incoming 365 days?

No. That only uses the current day (0) and the
same day of the previous year (365).

Maybe you meant [0:365]?

Plot your training data to determine the
order of a reasonable polynomial fit.

fft your data to determine if there are
any dominant periodicities.

This can help in a trial and error search for
how much past data is needed for prediction.

> ps : Matlab (R2008a) is used

Hope this helps.

Greg

From: kk KKsingh on
Greg Heath <heath(a)alumni.brown.edu> wrote in message <8c9af343-8751-4e98-9e33-1f1c1835397f(a)j13g2000yqj.googlegroups.com>...
> On Jul 10, 7:33 am, "Maitha " <maitha_...(a)hotmail.com> wrote:
> > Hi all,
> >
> > I am trying to develop an Adaptive Neural Network,  which has 4 inputs and one output.  The network should predict for next year (365 days).
> >
> > Training data sample : 4383
> > Testing data : 365
> >
> > I have used newfftd function as follows:
> > net = newfftd(pn,tn,[0 1], 5)
> >
> >  % pn : normalized input patterns, [-1, 1]
> > % tn : normalized output [-1,1]
> >
> > Based on what the delay input should be sit up? Should be [0 365] because I want to predict incoming 365 days?
>
> No. That only uses the current day (0) and the
> same day of the previous year (365).
>
> Maybe you meant [0:365]?
>
> Plot your training data to determine the
> order of a reasonable polynomial fit.
>
> fft your data to determine if there are
> any dominant periodicities.
>
> This can help in a trial and error search for
> how much past data is needed for prediction.
>
> > ps : Matlab (R2008a) is used
>
> Hope this helps.
>
> Greg

Please check the Matlab Help on ANN tool box they gave example of same problem over there

kumar
From: Maitha on
"kk KKsingh" <akikumar1983(a)gmail.com> wrote in message <i1epq1$rih$1(a)fred.mathworks.com>...
> Greg Heath <heath(a)alumni.brown.edu> wrote in message <8c9af343-8751-4e98-9e33-1f1c1835397f(a)j13g2000yqj.googlegroups.com>...
> > On Jul 10, 7:33 am, "Maitha " <maitha_...(a)hotmail.com> wrote:
> > > Hi all,
> > >
> > > I am trying to develop an Adaptive Neural Network,  which has 4 inputs and one output.  The network should predict for next year (365 days).
> > >
> > > Training data sample : 4383
> > > Testing data : 365
> > >
> > > I have used newfftd function as follows:
> > > net = newfftd(pn,tn,[0 1], 5)
> > >
> > >  % pn : normalized input patterns, [-1, 1]
> > > % tn : normalized output [-1,1]
> > >
> > > Based on what the delay input should be sit up? Should be [0 365] because I want to predict incoming 365 days?
> >
> > No. That only uses the current day (0) and the
> > same day of the previous year (365).
> >
> > Maybe you meant [0:365]?
> >
> > Plot your training data to determine the
> > order of a reasonable polynomial fit.
> >
> > fft your data to determine if there are
> > any dominant periodicities.
> >
> > This can help in a trial and error search for
> > how much past data is needed for prediction.
> >
> > > ps : Matlab (R2008a) is used
> >
> > Hope this helps.
> >
> > Greg
>
> Please check the Matlab Help on ANN tool box they gave example of same problem over there
>
> kumar

Greg & Kumar thank you for replaying

Maybe you meant [0:365]? YES

I plot training data (4 inputs) without output, I got graph but how can I interpret it to determine the order of a reasonable polynomial fit??

I covert training data (4 inputs) to Discrete Fourier transform, I got very strange graph??!! Should I deal with each input separately?
From: Greg Heath on
On Jul 14, 9:15 pm, "Maitha " <maitha_...(a)hotmail.com> wrote:
> "kk KKsingh" <akikumar1...(a)gmail.com> wrote in message <i1epq1$ri...(a)fred..mathworks.com>...
> > Greg Heath <he...(a)alumni.brown.edu> wrote in message <8c9af343-8751-4e98-9e33-1f1c18353...(a)j13g2000yqj.googlegroups.com>...
> > > On Jul 10, 7:33 am, "Maitha " <maitha_...(a)hotmail.com> wrote:
> > > > Hi all,
>
> > > > I am trying to develop anAdaptiveNeuralNetwork,  which has 4 inputs and one output.  The network should predict for next year (365 days).
>
> > > > Training data sample : 4383
> > > > Testing data : 365
>
> > > > I have used newfftd function as follows:
> > > > net = newfftd(pn,tn,[0 1], 5)
>
> > > >  % pn : normalized input patterns, [-1, 1]
> > > > % tn : normalized output [-1,1]
>
> > > > Based on what the delay input should be sit up? Should be [0 365] because I want to predict incoming 365 days?
>
> > > No. That only uses the current day (0) and the
> > > same day of the previous year (365).
>
> > > Maybe you meant [0:365]?
>
> > > Plot your training data to determine the
> > > order of a reasonable polynomial fit.
>
> > > fft your data to determine if there are
> > > any dominant periodicities.
>
> > > This can help in a trial and error search for
> > > how much past data is needed for prediction.
>
> > > > ps : Matlab (R2008a) is used
>
> > > Hope this helps.
>
> > > Greg
>
> > Please check the Matlab Help on ANN tool box they gave example of same problem over there
>
> > kumar
>
> Greg & Kumar thank you for replaying
>
> Maybe you meant [0:365]?  YES
>
> I plot training data (4 inputs) without output, I got graph but how can I interpret it to determine the order of a reasonable polynomial fit??
>
> I covert training data (4 inputs) to Discrete Fourier transform, I got very strange graph??!! Should I deal with each input separately?- Hide quoted text -

Most real-world NN design involves search
by trial and error guided by common sense.

If you look at a plot of data cross-eyed and
can visualize a smooth polynomial approximation
that fits the general data trend, you can
often guess at a reasonable initial value
in a search for the order of that polynomial.

If need be you can resort to a few illustrative
fits on examples of polynomial + noise

help polyfit

However, since this is just a rule of thumb
guide, don't get hung up on trying to optimize
a polynomial fit.

Since you need at least N+1 points to estimate
the N+1 coefficients of an Nth order polynomial,
that would be a reasonable initial value in
a search for the minimum number of delays
in a TDNN model.

If you plot the fft of zero mean data sampled
at a rate of Fs = 1/dt = 1/timespacing

help zscore

the sampled frequency spectrum will have a
sample frequency spacing of df = Fs/N. If
the lowest significant value is at frequency
f0, then it is reasonable to assume that it
will take at least N > Fs/f0 delays for a
reasonable TDNN model.

Hope this helps.

Greg