IEmSlideSmoothingSettings.Serie

Fore syntax

Serie: IEmSerie;

Fore.NET syntax

Serie: Prognoz.Platform.Interop.Modeller.IEmSerie;

Description

The Serie property determines the smoothable series.

Comments

If a smoothed series is not specified, the correct calculation of the Moving Average method is impossible.

Fore example

To execute the example, add a link to the Modeller system assembly.

Sub SlideSmoothing;
Var
    ExprMod: IExpressModeller;
    Ar: Array[14Of Double;
    Serie: IEmSerie;
    Sett: IEmSlideSmoothingSettings;
    Period: IEmPeriodSettings;
Begin
    ExprMod := New ExpressModeller.Create;
    Sett := ExprMod.CreateSlideSmoothingSettings;
    // Setting smoothable series
    Ar[0] := 5.8; Ar[1] := 5.0; Ar[2] := 2.6; Ar[4] := 7.2;
    Ar[5] := 2.8; Ar[6] := 6.2; Ar[7] := 9.5; Ar[8] := 7.4;
    Ar[10] := 9.4; Ar[11] := 10; Ar[12] := 5.4; Ar[13] := 8.1;
    Ar[3] := Double.Nan; Ar[9] := Double.Nan;
    Serie := ExprMod.Series.Add(Ar, "X1""Data series 1");
    Sett.Serie := Serie;
    // Setting window size
    Sett.Width := 3;
    // Centering the moving average
    Sett.CenterMovingAverage := True;
    // Setting calculation periods
    Period := Sett.Period;
    Period.BeginPeriod := 0;
    Period.EndPeriod := 13;
    // Performing calculation
    ExprMod.EvaluateMethod("C:\SlideSmoothing.html", Sett, True);
End Sub SlideSmoothing;

Example execution result: the Moving Average method is calculated with set parameters, calculation report is saved to the file C:\SlideSmoothing.html.

Fore.NET example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Modeller;

Public Shared Sub SlideSmoothing();
Var
    ExprMod: IExpressModeller;
    Ar: Array[14Of Double;
    Serie: IEmSerie;
    Sett: IEmSlideSmoothingSettings;
    Period: IEmPeriodSettings;
Begin
    ExprMod := New ExpressModeller.Create();
    Sett := ExprMod.CreateSlideSmoothingSettings();
    // Setting smoothable series
    Ar[0] := 5.8; Ar[1] := 5.0; Ar[2] := 2.6; Ar[4] := 7.2;
    Ar[5] := 2.8; Ar[6] := 6.2; Ar[7] := 9.5; Ar[8] := 7.4;
    Ar[10] := 9.4; Ar[11] := 10; Ar[12] := 5.4; Ar[13] := 8.1;
    Ar[3] := Double.Nan; Ar[9] := Double.Nan;
    Serie := ExprMod.Series.Add(Ar, "X1""Data series 1");
    Sett.Serie := Serie;
    // Setting window size
    Sett.Width := 3;
    // Centering the moving average
    Sett.CenterMovingAverage := True;
    // Setting calculation periods
    Period := Sett.Period;
    Period.BeginPeriod := 0;
    Period.EndPeriod := 13;
    // Performing calculation
    ExprMod.EvaluateMethod("C:\SlideSmoothing.html", Sett, True);
End Sub SlideSmoothing;

See also:

IEmSlideSmoothingSettings