From 0a86151c17715c6ccefe881ea102bf74553fcc08 Mon Sep 17 00:00:00 2001 From: sebastianwette Date: Wed, 29 Nov 2023 13:59:30 +0000 Subject: [PATCH] fixed the docstring error that prevented unit test from passing --- river/anomaly/pad.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/river/anomaly/pad.py b/river/anomaly/pad.py index e91f05ed55..c98f4c307f 100644 --- a/river/anomaly/pad.py +++ b/river/anomaly/pad.py @@ -76,23 +76,15 @@ class PredictiveAnomalyDetection(anomaly.base.SupervisedAnomalyDetector): ... warmup_period=15 ... ) + >>> scores = [] + >>> for t, (x, y) in enumerate(datasets.AirlinePassengers()): ... score = PAD.score_one(None, y) - ... PAD.learn_one(None, y) - ... print(score) - 0.0 - 0.0 - 0.0 - 0.0 - ... - 5.477831890312668e-05 - 0.07305562392710468 - 0.030122505497227493 - 0.04803795404401492 - 0.014216675596576562 - 0.04789677144570603 - 0.003410489566495498 + ... PAD = PAD.learn_one(None, y) + ... scores.append(score) + >>> print(scores[-3:]) + [0.014216675596576562, 0.04789677144570603, 0.003410489566495498] References ----------