initialize an exponential smoothing model - Maple Help

Home : Support : Online Help : Statistics : Time Series Analysis Package : TimeSeriesAnalysis/Initialize

TimeSeriesAnalysis[Initialize] - initialize an exponential smoothing model

 Calling Sequence Initialize(model, ts)

Parameters

 model - ts - Time series consisting of a single data set

Description

 • The Initialize command initializes the optimization process run by Optimize for finding suitable parameters and initial conditions for a specialized Exponential smoothing model.
 • It returns a table, indexed by the names of parameters or initial conditions. The value corresponding to an index is the number that that parameter or initial condition will be initialized to during the optimization process.
 • Parameters that are fixed beforehand are not given in the resulting table.

Examples

 > $\mathrm{with}\left(\mathrm{TimeSeriesAnalysis}\right):$

Consider the following time series.

 > $\mathrm{ts}:=\mathrm{TimeSeries}\left(\left[1.8,3.4,2.1,2.9,2.4,2.9,2.5,3.1\right],\mathrm{period}=2\right)$
 ${\mathrm{ts}}{:=}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{data set}}\\ {\mathrm{8 rows of data:}}\\ {\mathrm{2007 - 2014}}\end{array}\right]$ (1)

Specialize this into all applicable models.

 > $\mathrm{models}:=\mathrm{Specialize}\left(\mathrm{ExponentialSmoothingModel}\left(\right),\mathrm{ts}\right)$
 ${\mathrm{models}}{:=}\left[{\mathrm{< an ETS\left(A,A,A\right) model >}}{,}{\mathrm{< an ETS\left(A,A,N\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,A\right) model >}}{,}{\mathrm{< an ETS\left(A,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(A,N,A\right) model >}}{,}{\mathrm{< an ETS\left(A,N,N\right) model >}}{,}{\mathrm{< an ETS\left(M,A,A\right) model >}}{,}{\mathrm{< an ETS\left(M,A,M\right) model >}}{,}{\mathrm{< an ETS\left(M,A,N\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,A\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,M\right) model >}}{,}{\mathrm{< an ETS\left(M,Ad,N\right) model >}}{,}{\mathrm{< an ETS\left(M,M,M\right) model >}}{,}{\mathrm{< an ETS\left(M,M,N\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,M\right) model >}}{,}{\mathrm{< an ETS\left(M,Md,N\right) model >}}{,}{\mathrm{< an ETS\left(M,N,A\right) model >}}{,}{\mathrm{< an ETS\left(M,N,M\right) model >}}{,}{\mathrm{< an ETS\left(M,N,N\right) model >}}\right]$ (2)

Next, initialize each of these models.

 > $\mathrm{initialization_tables}:=\mathrm{map}\left(\mathrm{Initialize},\mathrm{models},\mathrm{ts}\right)$
 ${\mathrm{initialization_tables}}{:=}\left[{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0351190476190477}{,}{\mathrm{l0}}{=}{2.41071428571428}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{-}{0.375000000000000}\\ {0.512500000000000}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0773809523809526}{,}{\mathrm{l0}}{=}{2.28928571428571}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0351190476190477}{,}{\mathrm{l0}}{=}{2.41071428571428}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{-}{0.375000000000000}\\ {0.512500000000000}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0773809523809526}{,}{\mathrm{l0}}{=}{2.28928571428571}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{l0}}{=}{2.56875000000000}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{-}{0.381250000000000}\\ {0.518750000000000}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{l0}}{=}{2.63750000000000}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0351190476190477}{,}{\mathrm{l0}}{=}{2.41071428571428}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{-}{0.375000000000000}\\ {0.512500000000000}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0471683829401126}{,}{\mathrm{l0}}{=}{2.31025399169193}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{0.867877797325560}\\ {1.22504867885882}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0773809523809526}{,}{\mathrm{l0}}{=}{2.28928571428571}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0351190476190477}{,}{\mathrm{l0}}{=}{2.41071428571428}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{-}{0.375000000000000}\\ {0.512500000000000}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0474547670432530}{,}{\mathrm{l0}}{=}{2.31594155793230}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{0.866337320827478}\\ {1.22045629439217}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{0.0773809523809526}{,}{\mathrm{l0}}{=}{2.28928571428571}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{1.02015799136523}{,}{\mathrm{l0}}{=}{2.30027768778461}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{0.866411911381189}\\ {1.22047262484913}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{1.03693927243796}{,}{\mathrm{l0}}{=}{2.19796110842741}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{1.02015799136523}{,}{\mathrm{l0}}{=}{2.30027768778461}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{0.866411911381189}\\ {1.22047262484913}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{b0}}{=}{1.03693927243796}{,}{\mathrm{l0}}{=}{2.19796110842741}{,}{\mathrm{φ}}{=}{0.978}{,}{\mathrm{β}}{=}\frac{{1}}{{10}}\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{l0}}{=}{2.55701180603960}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{-}{0.380989109177452}\\ {0.519010890822548}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{l0}}{=}{2.51642347897302}{,}{\mathrm{γ}}{=}\frac{{1}}{{100}}{,}{s}{=}\left[\begin{array}{c}{0.869490084711176}\\ {1.21615190130110}\end{array}\right]\right]\right){,}{\mathrm{table}}\left(\left[{\mathrm{α}}{=}\frac{{1}}{{2}}{,}{\mathrm{l0}}{=}{2.58767635294028}\right]\right)\right]$ (3)

Because the models have different sets of parameters, the tables have different sets of indices.

 > $\mathrm{map}\left(\mathrm{print},\mathrm{map}\left(\left[\mathrm{indices}\right],\mathrm{initialization_tables},'\mathrm{nolist}'\right)\right):$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{l0}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{l0}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{β}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{b0}}{,}{\mathrm{l0}}{,}{\mathrm{φ}}{,}{\mathrm{β}}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{l0}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{l0}}{,}{\mathrm{γ}}{,}{s}\right]$
 $\left[{\mathrm{α}}{,}{\mathrm{l0}}\right]$ (4)

Every model contains l0, the initial value for the variable ${\ell }_{t}$. The values are different for different models:

 > $\mathrm{map}\left(x→{x}_{\mathrm{l0}},\mathrm{initialization_tables}\right)$
 $\left[{2.41071428571428}{,}{2.28928571428571}{,}{2.41071428571428}{,}{2.28928571428571}{,}{2.56875000000000}{,}{2.63750000000000}{,}{2.41071428571428}{,}{2.31025399169193}{,}{2.28928571428571}{,}{2.41071428571428}{,}{2.31594155793230}{,}{2.28928571428571}{,}{2.30027768778461}{,}{2.19796110842741}{,}{2.30027768778461}{,}{2.19796110842741}{,}{2.55701180603960}{,}{2.51642347897302}{,}{2.58767635294028}\right]$ (5)

On the other hand, $\mathrm{\alpha }$ (also present in all models) is always initialized to $\frac{1}{2}$.

 > $\mathrm{map}\left(x→{x}_{\mathrm{α}},\mathrm{initialization_tables}\right)$
 $\left[\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}{,}\frac{{1}}{{2}}\right]$ (6)