Skip to content

Commit

Permalink
improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
qbarthelemy committed Oct 7, 2024
1 parent 33604fb commit 43e4a12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pypermut/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ def correct_bonferroni(p_vals, n_tests=None):
-------
p_vals_corrected : array, shape (n_vals,)
The p-values corrected by Bonferroni's method.
References
----------
.. [1] https://en.wikipedia.org/wiki/Bonferroni_correction
"""
if n_tests is None:
n_tests = len(p_vals)
Expand Down
5 changes: 3 additions & 2 deletions pypermut/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def permutation_metric(y_true, y_score, func, *, n=10000, side="right"):
n : int, default=10000
Number of permutations for the permutation test.
side : string, default="right"
side : {"left", "two", "right"}, default="right"
Side of the test:
* "left" for a left-sided test,
Expand All @@ -63,7 +63,8 @@ def permutation_metric(y_true, y_score, func, *, n=10000, side="right"):
raise ValueError(
"Inputs y_true and y_score do not have compatible dimensions: "
"y_true is of dimension {} while y_score is {}."
.format(y_true.shape, y_score.shape))
.format(y_true.shape, y_score.shape)
)
n_samples = y_true.shape[0]

# under the null hypothesis, sample the metric distribution
Expand Down

0 comments on commit 43e4a12

Please sign in to comment.