jihaozh 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_r249150942
##########
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:
consider use feedback.getFeedbackType().isAnomaly() ? that one is in the
feedback type label class, make it easier to manage the labels.
----------------------------------------------------------------
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]