xiaohui-sun commented on a change in pull request #4176: [TE] anomaly detector
interface change and implementation for rule-based detection
URL: https://github.com/apache/incubator-pinot/pull/4176#discussion_r279574545
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/components/AbsoluteChangeRuleDetector.java
##########
@@ -105,11 +109,44 @@
// make anomalies
DatasetConfigDTO datasetConfig =
data.getDatasetForMetricId().get(me.getId());
- return DetectionUtils.makeAnomalies(slice, df, COL_ANOMALY,
window.getEndMillis(),
+ List<MergedAnomalyResultDTO> anomalies =
DetectionUtils.makeAnomalies(slice, df, COL_ANOMALY, window.getEndMillis(),
DetectionUtils.getMonitoringGranularityPeriod(monitoringGranularity,
datasetConfig), datasetConfig);
+ return DetectionResult.from(anomalies,
TimeSeries.fromDataFrame(constructAbsoluteChangeBoundaries(df)));
Review comment:
I would suggest to put baseline calculation in a separate line so it is
easier to debug.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]