xiaohui-sun commented on a change in pull request #3709: [TE] - Fix true 
anomaly definition to include expected anomaly 
URL: https://github.com/apache/incubator-pinot/pull/3709#discussion_r249145991
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detector/email/filter/PrecisionRecallEvaluator.java
 ##########
 @@ -203,8 +203,8 @@ public void init(List<MergedAnomalyResultDTO> anomalies) {
       if (feedback != null && feedback.getFeedbackType() != null && 
feedback.getFeedbackType()
           .equals(AnomalyFeedbackType.ANOMALY_NEW_TREND)) {
         isLabeledTrueAnomalyNewTrend = true;
-      } else if (feedback != null && feedback.getFeedbackType() != null && 
feedback.getFeedbackType()
-          .equals(AnomalyFeedbackType.ANOMALY)) {
+      } else if (feedback != null && feedback.getFeedbackType() != null &&
+          (feedback.getFeedbackType().equals(AnomalyFeedbackType.ANOMALY) || 
feedback.getFeedbackType().equals(AnomalyFeedbackType.ANOMALY_EXPECTED))) {
 
 Review comment:
   Put it into a helper function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to