IMsExponentialSmoothingTransform.AutoSearch

Syntax

AutoSearch: IExponentialSmoothingAutoSearch;

Description

The AutoSearch property returns settings for auto-fitting of parameters of exponential smoothing.

Comments

The property can be used to set the mode of getting method parameters (Alfa, Delta, Gamma, Phi): calculated automatically or set by the user (the IMsExponentialSmoothingTransform.Parameters property).

Example

Executing the example requires that the repository contains a modeling container with the OBJ_MS identifier containing a model with the MODEL identifier. The model is calculated by means of the exponential smoothing method.

Add links to the Ms, Metabase and Stat system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    MsDescrKey: Integer;
    Model: IMsModel;
    ModelTrans: IMsFormulaTransform;
    Formula: IMsFormula;
    ExpSmoothing: IMsExponentialSmoothingTransform;
    AutoSearch: IExponentialSmoothingAutoSearch;
    Params: IExponentialSmoothingParameters;
Begin
    Mb := MetabaseClass.Active;
    MsDescrKey := Mb.ItemById("OBJ_MS").Key;
    // Get model
    Model := MB.ItemByIdNamespace("MODEL", MsDescrKey).Edit As IMsModel;
    ModelTrans := Model.Transform;
    // Set up model calculation parameters
    Formula := ModelTrans.FormulaItem(0);
    ExpSmoothing := Formula.Method As IMsExponentialSmoothingTransform;
    AutoSearch := ExpSmoothing.AutoSearch;
    AutoSearch.DeltaSearch := True;
    AutoSearch.GammaSearch := True;
    AutoSearch.PhiSearch := True;
    AutoSearch.AlphaSearch := False;
    Params := ExpSmoothing.Parameters;
    Params.Alpha := 0.15;
    // Save model calculation parameters
    (Model As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the following method parameters are set: Delta, Gamma and Phi are calculated automatically, whereas Alpha is set by the user.

See also:

IMsExponentialSmoothingTransform