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_r249158040
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detector/email/filter/PrecisionRecallEvaluator.java
 ##########
 @@ -200,12 +202,14 @@ public void init(List<MergedAnomalyResultDTO> anomalies) 
{
       AnomalyFeedback feedback = anomaly.getFeedback();
       boolean isLabeledTrueAnomaly = false;
       boolean isLabeledTrueAnomalyNewTrend = false;
-      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)) {
-        isLabeledTrueAnomaly = true;
+      if (feedback != null && feedback.getFeedbackType() != null) {
+        AnomalyClassificationType anomalyClassificationType = 
ResourceUtils.getClassificationType(feedback.getFeedbackType());
+        if (anomalyClassificationType == 
AnomalyClassificationType.TRUE_POSITIVE) {
 
 Review comment:
   Done.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@pinot.apache.org
For additional commands, e-mail: dev-h...@pinot.apache.org

Reply via email to