use of com.linkedin.thirdeye.anomalydetection.model.merge.SimplePercentageMergeModel in project pinot by linkedin.
the class WeekOverWeekRuleFunction method init.
public void init(Properties properties) {
this.properties = properties;
String baselineProp = this.properties.getProperty(BASELINE);
if (StringUtils.isNotBlank(baselineProp)) {
this.initPropertiesForDataModel(baselineProp);
}
dataModel = new SeasonalDataModel();
dataModel.init(this.properties);
// Removes zeros from time series, which currently mean empty values in ThirdEye.
TransformationFunction zeroRemover = new ZeroRemovalFunction();
currentTimeSeriesTransformationChain.add(zeroRemover);
baselineTimeSeriesTransformationChain.add(zeroRemover);
// Add total count threshold transformation
if (this.properties.containsKey(TotalCountThresholdRemovalFunction.TOTAL_COUNT_METRIC_NAME)) {
TransformationFunction totalCountThresholdFunction = new TotalCountThresholdRemovalFunction();
totalCountThresholdFunction.init(this.properties);
currentTimeSeriesTransformationChain.add(totalCountThresholdFunction);
}
// Add moving average smoothing transformation
if (this.properties.containsKey(ENABLE_SMOOTHING)) {
TransformationFunction movingAverageSoothingFunction = new MovingAverageSmoothingFunction();
movingAverageSoothingFunction.init(this.properties);
currentTimeSeriesTransformationChain.add(movingAverageSoothingFunction);
baselineTimeSeriesTransformationChain.add(movingAverageSoothingFunction);
}
predictionModel = new SeasonalAveragePredictionModel();
predictionModel.init(this.properties);
detectionModel = new SimpleThresholdDetectionModel();
detectionModel.init(this.properties);
mergeModel = new SimplePercentageMergeModel();
mergeModel.init(this.properties);
}
Aggregations