Skip to content

Commit

Permalink
Revert "Update metrics.py"
Browse files Browse the repository at this point in the history
  • Loading branch information
kgdunn authored Apr 22, 2024
1 parent 0019f9f commit 33876b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions process_improve/univariate/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,10 @@ def outlier_detection_multiple(
R_i_idx = R.idxmax()
g = R.max()
# Formula from the R-function for the Grubb's calculation
s = (g ** 2 * N * (2 - N)) / (g ** 2 * N - (N - 1) ** 2)
if s <= 0:
t = np.sqrt((g ** 2 * N * (2 - N)) / (g ** 2 * N - (N - 1) ** 2))
if t <= 0:
p_value = 0
else:
t= np.sqrt(s)
p_value = min(N * (1 - t_value_cdf(t, N - 2)), 1)

extra_out["R_i_idx"].append(R_i_idx)
Expand Down

0 comments on commit 33876b9

Please sign in to comment.