AutoSearch: IExponentialSmoothingAutoSearch;
The property is read-only.
The AutoSearch property returns settings for auto-fitting of parameters of exponential smoothing.
Using AutoSearch it is possible to set the mode of receiving method parameters (Alfa, Delta, Gamma, Phi): calculated automatically or set by the user (the IMsExponentialSmoothingTransform.Parameters property).
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. It is also necessary to 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 method parameters delta, gamma and phi are calculated automatically, whereas alpha parameter is set by the user.
See also: