Search in sources :

Example 1 with SimplePercentageMergeModel

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);
}
Also used : SimplePercentageMergeModel(com.linkedin.thirdeye.anomalydetection.model.merge.SimplePercentageMergeModel) ZeroRemovalFunction(com.linkedin.thirdeye.anomalydetection.model.transform.ZeroRemovalFunction) SeasonalAveragePredictionModel(com.linkedin.thirdeye.anomalydetection.model.prediction.SeasonalAveragePredictionModel) SeasonalDataModel(com.linkedin.thirdeye.anomalydetection.model.data.SeasonalDataModel) MovingAverageSmoothingFunction(com.linkedin.thirdeye.anomalydetection.model.transform.MovingAverageSmoothingFunction) SimpleThresholdDetectionModel(com.linkedin.thirdeye.anomalydetection.model.detection.SimpleThresholdDetectionModel) TransformationFunction(com.linkedin.thirdeye.anomalydetection.model.transform.TransformationFunction) TotalCountThresholdRemovalFunction(com.linkedin.thirdeye.anomalydetection.model.transform.TotalCountThresholdRemovalFunction)

Aggregations

SeasonalDataModel (com.linkedin.thirdeye.anomalydetection.model.data.SeasonalDataModel)1 SimpleThresholdDetectionModel (com.linkedin.thirdeye.anomalydetection.model.detection.SimpleThresholdDetectionModel)1 SimplePercentageMergeModel (com.linkedin.thirdeye.anomalydetection.model.merge.SimplePercentageMergeModel)1 SeasonalAveragePredictionModel (com.linkedin.thirdeye.anomalydetection.model.prediction.SeasonalAveragePredictionModel)1 MovingAverageSmoothingFunction (com.linkedin.thirdeye.anomalydetection.model.transform.MovingAverageSmoothingFunction)1 TotalCountThresholdRemovalFunction (com.linkedin.thirdeye.anomalydetection.model.transform.TotalCountThresholdRemovalFunction)1 TransformationFunction (com.linkedin.thirdeye.anomalydetection.model.transform.TransformationFunction)1 ZeroRemovalFunction (com.linkedin.thirdeye.anomalydetection.model.transform.ZeroRemovalFunction)1