Skip to content

Commit

Permalink
fix(pot-detector-plot): handle non-zero anomaly scores in method inst…
Browse files Browse the repository at this point in the history
…ead in plot function
  • Loading branch information
ninopleno committed Dec 11, 2023
1 parent 9aeb528 commit eed6cca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/anomalytics/models/peaks_over_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,10 @@ def plot(
alpha=alpha,
)
elif plot_type == "l+ath":
if isinstance(self.__anomaly_score, pd.Series):
nonzero_anomaly_scores = self.__anomaly_score[self.__anomaly_score.values > 0]
plot_line(
dataset=self.__anomaly_score,
dataset=nonzero_anomaly_scores,
threshold=self.__anomaly_threshold,
title=title,
xlabel=xlabel,
Expand Down

0 comments on commit eed6cca

Please sign in to comment.