diff --git a/river/stats/kolmogorov_smirnov.py b/river/stats/kolmogorov_smirnov.py index afacd14e7f..d3f0432b23 100644 --- a/river/stats/kolmogorov_smirnov.py +++ b/river/stats/kolmogorov_smirnov.py @@ -277,8 +277,10 @@ def get(self): if self.statistic == "ks": return max(self.treap.max_value, -self.treap.min_value) / self.n_samples - else: + elif self.statistic == "kuiper": return max(self.treap.max_value - self.treap.min_value) / self.n_samples + else: + raise ValueError(f"Unknown statistic {self.statistic}, expected one of: ks, kuiper") def test_ks_threshold(self, ca): """