TimeSeriesAnalysis
GetParameter
get the value of one or more parameters of a model
GetParameters
get the value of all parameters of a model
SetParameter
set the value of a parameter of a model
Calling Sequence
Parameters
Description
Examples
Compatibility
GetParameter(model, param)
GetParameter(model, params)
GetParameters(model, opt)
SetParameter(model, param, value)
SetParameter(model, param = value)
model
-
exponential smoothing model
param
parameter name
params
list of parameter names
opt
(optional) equation of the form output = o, where o is one of all, assigned, unassigned
value
new value for the parameter
These three commands work with all parameters of a model, not just the ones that are subject to optimization. This is in contrast with NumberOfParameters, which works only with parameters that can be optimized in a continuous domain.
The command GetParameter can be used to examine the value of one or a few named parameters of a model. If the second argument is the name of a parameter, it returns the value of that parameter. If it is a list of parameter names, it returns the corresponding list of values.
The command GetParameters can be used to examine the value of all parameters of a model, without knowing their names. It can also be used to find all assigned or unassigned parameters. This is decided by the use of the output option. Its default value is all, which means to return all parameters. In particular, it returns a list consisting of the names of all unassigned parameters, and equations of the form name = value for all assigned parameters. If the argument output = assigned is specified, then a list with only the equations is returned. If output = unassigned is specified, then a list with only the names is returned.
The command SetParameter can be used to set the value of a parameter of a model. The two calling sequences are equivalent. If a parameter is set already, and SetParameter is used to set it to a different value, then it will issue a warning.
Setting some parameters may set other parameters as well. For example, with exponential smoothing models, setting the trend parameter to exclude trend behavior will set all trend-related parameters to their default value; these then do not occur in the model anymore. (They are, for example, not counted by NumberOfParameters.)
For both GetParameter and SetParameter, if the global variable with the same name as the parameter is assigned a value, it may be necessary to protect it from evaluation using uneval quotes, as in α.
The help page for exponential smoothing models has an explanation of the legal values for its parameters.
with⁡TimeSeriesAnalysis:
Consider an exponential smoothing model. Initially all parameters are unset, except for the errors, trend, and seasonal parameters that determine what the model can be specialized to, and the constraints parameter that determines whether traditional and/or admissibility constraints are enforced.
model≔ExponentialSmoothingModel⁡
model≔< an ETS(*,*,*) model >
GetParameters⁡model
errors=A,M,trend=A,Ad,M,Md,N,seasonal=A,M,N,α,β,γ,φ,period,l0,b0,s,σ,constraints=both
If we set the trend parameter to {"A", "M"} (signifying that the trend is additive or multiplicative, but not damped), we will get a warning that the current value is being overwritten. Also, the parameter phi (which determines damping) is set to its default value, 1.0.
SetParameter⁡model,trend=A,M
GetParameters⁡model,output=assigned
errors=A,M,trend=A,M,seasonal=A,M,N,φ=1.,constraints=both
Consider an exponential smoothing model with parameters M,N,A where we fix α to be 23.
model2≔ExponentialSmoothingModel⁡M,N,A,α=23
model2≔< an ETS(M,N,A) model >
Let us verify the values of α and of the parameters errors, trend, and seasonal.
GetParameter⁡model2,α
23
GetParameter⁡model2,errors,trend,seasonal
M,N,A
These are the unassigned parameters:
GetParameters⁡model2,output=unassigned
γ,period,l0,s,σ
The TimeSeriesAnalysis[GetParameter], TimeSeriesAnalysis[GetParameters] and TimeSeriesAnalysis[SetParameter] commands were introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
NumberOfParameters
Download Help Document