Search in sources :

Example 1 with ZeroRemovalFunction

use of com.linkedin.thirdeye.anomalydetection.model.transform.ZeroRemovalFunction in project pinot by linkedin.

the class MinMaxThresholdFunction method init.

@Override
public void init(AnomalyFunctionDTO spec) throws Exception {
    super.init(spec);
    // Removes zeros from time series, which currently mean empty values in ThirdEye.
    TransformationFunction zeroRemover = new ZeroRemovalFunction();
    currentTimeSeriesTransformationChain.add(zeroRemover);
    detectionModel = new MinMaxThresholdDetectionModel();
    detectionModel.init(properties);
    mergeModel = new MinMaxThresholdMergeModel();
    mergeModel.init(properties);
}
Also used : ZeroRemovalFunction(com.linkedin.thirdeye.anomalydetection.model.transform.ZeroRemovalFunction) MinMaxThresholdMergeModel(com.linkedin.thirdeye.anomalydetection.model.merge.MinMaxThresholdMergeModel) MinMaxThresholdDetectionModel(com.linkedin.thirdeye.anomalydetection.model.detection.MinMaxThresholdDetectionModel) TransformationFunction(com.linkedin.thirdeye.anomalydetection.model.transform.TransformationFunction)

Example 2 with ZeroRemovalFunction

use of com.linkedin.thirdeye.anomalydetection.model.transform.ZeroRemovalFunction 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

TransformationFunction (com.linkedin.thirdeye.anomalydetection.model.transform.TransformationFunction)2 ZeroRemovalFunction (com.linkedin.thirdeye.anomalydetection.model.transform.ZeroRemovalFunction)2 SeasonalDataModel (com.linkedin.thirdeye.anomalydetection.model.data.SeasonalDataModel)1 MinMaxThresholdDetectionModel (com.linkedin.thirdeye.anomalydetection.model.detection.MinMaxThresholdDetectionModel)1 SimpleThresholdDetectionModel (com.linkedin.thirdeye.anomalydetection.model.detection.SimpleThresholdDetectionModel)1 MinMaxThresholdMergeModel (com.linkedin.thirdeye.anomalydetection.model.merge.MinMaxThresholdMergeModel)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