IEmMedianSmoothingSettings.Serie

Fore syntax

Serie: IEmSerie;

Fore.NET syntax

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

Description

The Serie property determines a smoothable series.

Comments

If the smoothable series is not specified, the correct calculation of the Median Smoothing method is not possible.

Fore example

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

Sub MedianSmoothing;
Var
    ExprMod: IExpressModeller;
    Ar: Array[14Of Double;
    Serie: IEmSerie;
    Sett: IEmMedianSmoothingSettings;
    Period: IEmPeriodSettings;
Begin
    ExprMod := New ExpressModeller.Create;
    Sett := ExprMod.CreateMedianSmoothingSettings;
    // Setting smoothable series
    Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
    Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
    Ar[8] := 67; Ar[9] := 98; Ar[10] := 89; Ar[13] := 79;
    Ar[11] := Double.Nan; Ar[12] := Double.Nan;
    Serie := ExprMod.Series.Add(Ar, "X1""Data series 1");
    Sett.Serie := Serie;
    // Setting window size
    Sett.Width := 6;
    // Setting calculation periods
    Period := Sett.Period;
    Period.BeginPeriod := 0;
    Period.EndPeriod := 13;
    Period.EndFore := 4;
    // Performing calculation
    ExprMod.EvaluateMethod("C:\MedianSmoothing.html", Sett, True);
End Sub MedianSmoothing;

Example execution result: the Median Smoothing method is to be calculated with set parameters, calculation report is to be saved to the file C:\MedianSmoothing.html.

Fore.NET example

Imports Prognoz.Platform.Interop.Modeller;

Public Shared Sub MedianSmoothing();
Var
    ExprMod: IExpressModeller;
    Ar: Array[14Of Double;
    Serie: IEmSerie;
    Sett: IEmMedianSmoothingSettings;
    Period: IEmPeriodSettings;
Begin
    ExprMod := New ExpressModeller.Create();
    Sett := ExprMod.CreateMedianSmoothingSettings();
    // Setting smoothable series
    Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
    Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
    Ar[8] := 67; Ar[9] := 98; Ar[10] := 89; Ar[13] := 79;
    Ar[11] := Double.Nan; Ar[12] := Double.Nan;
    Serie := ExprMod.Series.Add(Ar, "X1""Data series 1");
    Sett.Serie := Serie;
    // Setting window size
    Sett.Width := 6;
    // Setting calculation periods
    Period := Sett.Period;
    Period.BeginPeriod := 0;
    Period.EndPeriod := 13;
    Period.EndFore := 4;
    // Performing calculation
    ExprMod.EvaluateMethod("C:\MedianSmoothing.html", Sett, True);
End Sub MedianSmoothing;

Example execution result: the Median Smoothing method is to be calculated with set parameters, calculation report is to be saved to the file C:\MedianSmoothing.html.

See also:

IEmMedianSmoothingSettings