Skip to content

Commit

Permalink
Update psi_detector.py
Browse files Browse the repository at this point in the history
  • Loading branch information
951378644 authored Nov 22, 2023
1 parent dab9abf commit 2e9656a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions menelaus/data_drift/psi_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def update(self, X: np.array, y_true=None, y_pred=None):
grp_new = df_new.groupby("bin").count()
grp_new["percent_new"] = grp_new["new"] / sum(grp_new["new"])
psi_value = self._PSI(grp_initial, grp_new)
self.PSI_value = psi_value
self._PSI_value = psi_value
if psi_value >= self.threshold:
self._drift_state = "drift"
self.set_reference(test_batch)
Expand Down Expand Up @@ -144,7 +144,7 @@ def _PSI(self, reference_feature, test_feature):
)
return np.mean(psi_df["psi"])

def PSI_value(self):
def _PSI_value(self):
"""
Get the last calculated PSI value.
Expand Down

0 comments on commit 2e9656a

Please sign in to comment.