use of com.linkedin.thirdeye.anomalydetection.model.merge.NoPredictionMergeModel in project pinot by linkedin.
the class AbstractModularizedAnomalyFunction method updateMergedAnomalyInfo.
@Override
public void updateMergedAnomalyInfo(AnomalyDetectionContext anomalyDetectionContext, MergedAnomalyResultDTO anomalyToUpdated) throws Exception {
MergeModel mergeModel = getMergeModel();
if (!(mergeModel instanceof NoPredictionMergeModel)) {
if (checkPrecondition(anomalyDetectionContext)) {
String mainMetric = anomalyDetectionContext.getAnomalyDetectionFunction().getSpec().getTopicMetric();
// Transform current and baseline time series and train the prediction model
transformAndPredictTimeSeries(mainMetric, anomalyDetectionContext);
} else {
LOGGER.error("The precondition of anomaly detection context does not hold: please make sure" + "the observed time series and anomaly function are not null.");
return;
}
}
mergeModel.update(anomalyDetectionContext, anomalyToUpdated);
}
use of com.linkedin.thirdeye.anomalydetection.model.merge.NoPredictionMergeModel in project pinot by linkedin.
the class AbstractModularizedAnomalyFunction method updateMergedAnomalyInfo.
@Override
public void updateMergedAnomalyInfo(MergedAnomalyResultDTO anomalyToUpdated, MetricTimeSeries timeSeries, DateTime windowStart, DateTime windowEnd, List<MergedAnomalyResultDTO> knownAnomalies) throws Exception {
AnomalyDetectionContext anomalyDetectionContext = null;
if (!(getMergeModel() instanceof NoPredictionMergeModel)) {
anomalyDetectionContext = BackwardAnomalyFunctionUtils.buildAnomalyDetectionContext(this, timeSeries, spec.getTopicMetric(), anomalyToUpdated.getDimensions(), spec.getBucketSize(), spec.getBucketUnit(), windowStart, windowEnd);
}
updateMergedAnomalyInfo(anomalyDetectionContext, anomalyToUpdated);
}
Aggregations