LowerPercentile: Integer;
LowerPercentile: integer;
The LowerPercentile property determines lower outlier border probability.
Range of property available values: [0;100].
To set upper outlier border probability, use the IValidationStatisticalOutliers.UpperPercentile property.
Executing the example requires that the repository contains a time series database with the TSDB_VALIDATION_PARAMETERS identifier containing a validation rule with the VALIDATION identifier.
Add links to the Dimensions, Metabase, Ms system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
RubrKey: Integer;
ValidObj: IMetabaseObject;
ValidFilter: IValidationFilter;
StatisticalOutliers: IValidationStatisticalOutliers;
Begin
Mb := MetabaseClass.Active;
// Get time series database key
RubrKey := Mb.GetObjectKeyById("TSDB_VALIDATION_PARAMETERS");
// Get validation rule
ValidObj := Mb.ItemByIdNamespace("VALIDATION", RubrKey).Edit;
ValidFilter := ValidObj As IValidationFilter;
// Set calendar frequency of checked data
ValidFilter.Level := DimCalendarLevel.Year;
// Set validation rule type
ValidFilter.Kind := ValidationDetailsKind.StatisticalOutliers;
// Set up rule parameters
StatisticalOutliers := ValidFilter.Details As IValidationStatisticalOutliers;
// Set lower and upper outlier border probability
StatisticalOutliers.LowerPercentile := 10;
StatisticalOutliers.UpperPercentile := 20;
// Use error inverting
StatisticalOutliers.InvertException := True;
// Find statistical outliers by frequency points
StatisticalOutliers.OutliersType := ValidationStatisticalOutliersType.CrossDate;
// Clear execution area and validation filter
StatisticalOutliers.SelectionTargetData.Clear;
StatisticalOutliers.SelectionFilter.Clear;
// Save the rule
ValidObj.Save;
End Sub UserProc;
After executing the example the VALIDATION validation rule is reconfigured. The following parameters are set for the rule:
The Statistical Outliers Analysis rule type.
Lower outlier border probability - 10.
Upper outlier border probability - 20.
Filtering of checked data is not executed.
Outliers are found by annual frequency points.
Conditions and result of executing the Fore.NET example match with that of the Fore example.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Ms;
…
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
RubrKey: uinteger;
ValidObj: IMetabaseObject;
ValidFilter: IValidationFilter;
StatisticalOutliers: IValidationStatisticalOutliers;
Begin
Mb := Params.Metabase;
// Get time series database key
RubrKey := Mb.GetObjectKeyById("TSDB_VALIDATION_PARAMETERS");
// Get validation rule
ValidObj := Mb.ItemByIdNamespace["VALIDATION", RubrKey].Edit();
ValidFilter := ValidObj As IValidationFilter;
// Set calendar frequency of checked data
ValidFilter.Level := DimCalendarLevel.dclYear;
// Set validation rule type
ValidFilter.Kind := ValidationDetailsKind.vdkStatisticalOutliers;
// Set up rule parameters
StatisticalOutliers := ValidFilter.Details As IValidationStatisticalOutliers;
// Set lower and upper outlier border probability
StatisticalOutliers.LowerPercentile := 10;
StatisticalOutliers.UpperPercentile := 20;
// Use error inverting
StatisticalOutliers.InvertException := True;
// Find statistical outliers by frequency points
StatisticalOutliers.OutliersType := ValidationStatisticalOutliersType.vsostCrossDate;
// Clear execution area and validation filter
StatisticalOutliers.SelectionTargetData.Clear();
StatisticalOutliers.SelectionFilter.Clear();
// Save the rule
ValidObj.Save();
End Sub;
See also: