get the value of one or more parameters of a model - Maple Help

Online Help

All Products    Maple    MapleSim


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

TimeSeriesAnalysis[GetParameter] - get the value of one or more parameters of a model

TimeSeriesAnalysis[GetParameters] - get the value of all parameters of a model

TimeSeriesAnalysis[SetParameter] - set the value of a parameter of a model

Calling Sequence

GetParameter(model, param)

GetParameter(model, params)

GetParameters(model, opt)

SetParameter(model, param, value)

SetParameter(model, param = value)

Parameters

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

Description

• 

These three commands deal with all parameters of a model, not just the ones that are subject to optimization. This is in contrast with NumberOfParameters, which deals 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 behaviour 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.

Examples

withTimeSeriesAnalysis:

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 >

(1)

GetParametersmodel

errors&equals;A&comma;M&comma;trend&equals;A&comma;Ad&comma;M&comma;Md&comma;N&comma;seasonal&equals;A&comma;M&comma;N&comma;&alpha;&comma;&beta;&comma;&gamma;&comma;&phi;&comma;period&comma;l0&comma;b0&comma;s&comma;&sigma;&comma;constraints&equals;both

(2)

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.

SetParametermodel&comma;&apos;trend&apos;&equals;A&comma;M

Warning, changing parameter trend from value {"A", "Ad", "M", "Md", "N"} to value {"A", "M"}

GetParametersmodel&comma;&apos;output&equals;assigned&apos;

errors&equals;A&comma;M&comma;trend&equals;A&comma;M&comma;seasonal&equals;A&comma;M&comma;N&comma;&phi;&equals;1.&comma;constraints&equals;both

(3)

Consider an exponential smoothing model with parameters M&comma;N&comma;A where we fix α to be 23.

model2:=ExponentialSmoothingModelM&comma;N&comma;A&comma;&alpha;&equals;23

model2:=< an ETS(M,N,A) model >

(4)

Let us verify the values of α and of the parameters errors, trend, and seasonal.

GetParametermodel2&comma;&alpha;

23

(5)

GetParametermodel2&comma;&apos;errors&apos;&comma;&apos;trend&apos;&comma;&apos;seasonal&apos;

M&comma;N&comma;A

(6)

These are the unassigned parameters:

GetParametersmodel2&comma;&apos;output&equals;unassigned&apos;

&gamma;&comma;period&comma;l0&comma;s&comma;&sigma;

(7)

See Also

NumberOfParameters, TimeSeriesAnalysis


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam