GetParameter - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

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

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.

modelExponentialSmoothingModel

model< an ETS(*,*,*) model >

(1)

GetParametersmodel

errors=A&comma;M&comma;trend=A&comma;Ad&comma;M&comma;Md&comma;N&comma;seasonal=A&comma;M&comma;N&comma;α&comma;β&comma;γ&comma;φ&comma;period&comma;l0&comma;b0&comma;s&comma;σ&comma;constraints=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;trend=A&comma;M

GetParametersmodel&comma;output=assigned

errors=A&comma;M&comma;trend=A&comma;M&comma;seasonal=A&comma;M&comma;N&comma;φ=1.&comma;constraints=both

(3)

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

model2ExponentialSmoothingModelM&comma;N&comma;A&comma;α=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;α

23

(5)

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

M&comma;N&comma;A

(6)

These are the unassigned parameters:

GetParametersmodel2&comma;output=unassigned

γ&comma;period&comma;l0&comma;s&comma;σ

(7)

Compatibility

• 

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

TimeSeriesAnalysis