Skip to content

Commit

Permalink
Update test_psi_detector.py
Browse files Browse the repository at this point in the history
  • Loading branch information
951378644 committed Nov 22, 2023
1 parent 3266872 commit 4d4d532
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/menelaus/data_drift/test_psi_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def test_psi_compute_PSI():
"""Check psi._compute_threshold works correctly"""
det = PSI()
np.random.seed(123)
PSI.set_reference(np.random.randint(0,100,100))
PSI.update(np.random.randint(0,100,100))
ref = np.random.randint(0,100,100)
test = np.random.randint(0,100,100)
PSI.set_reference(ref)
PSI.update(test)
threshold = PSI.PSI_value
assert threshold >= 0 and threshold <= 1

0 comments on commit 4d4d532

Please sign in to comment.