Skip to content

Commit

Permalink
Update code from reviewer's suggestion.
Browse files Browse the repository at this point in the history
Co-authored-by: Max Halford <maxhalford25@gmail.com>
  • Loading branch information
hoanganhngo610 and MaxHalford authored Oct 30, 2023
1 parent c39299a commit 216b2e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion river/stats/kolmogorov_smirnov.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 216b2e0

Please sign in to comment.