8000 DOC Add doc for permutation_test_score (#17373) · scikit-learn/scikit-learn@793f974 · GitHub
[go: up one dir, main page]

Skip to content

Commit 793f974

Browse files
authored
DOC Add doc for permutation_test_score (#17373)
1 parent 8980458 commit 793f974

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

sklearn/model_selection/_validation.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,19 @@ def _check_is_permutation(indices, n_samples):
10391039
def permutation_test_score(estimator, X, y, *, groups=None, cv=None,
10401040
n_permutations=100, n_jobs=None, random_state=0,
10411041
verbose=0, scoring=None):
1042-
"""Evaluate the significance of a cross-validated score with permutations
1042+
"""Evaluates the significance of a cross-validated score using permutations
10431043
1044-
Read more in the :ref:`User Guide <cross_validation>`.
1044+
Permutes targets to generate 'randomized data' and compute the empirical
1045+
p-value against the null hypothesis that features and targets are
1046+
independent.
1047+
1048+
The p-value represents the fraction of randomized data sets where the
1049+
estimator performed as well or better than in the original data. A small
1050+
p-value suggests that there is a real dependency between features and
1051+
targets which has been used by the estimator to give good predictions.
1052+
A large p-value may be due to lack of real dependency between features
1053+
and targets or the estimator was not able to use the dependency to
1054+
give good predictions.
10451055
10461056
Parameters
10471057
----------
@@ -1129,10 +1139,10 @@ def permutation_test_score(estimator, X, y, *, groups=None, cv=None,
11291139
-----
11301140
This function implements Test 1 in:
11311141
1132-
Ojala and Garriga. Permutation Tests for Studying Classifier
1133-
Performance. The Journal of Machine Learning Research (2010)
1134-
vol. 11
1135-
`[pdf] <http://www.jmlr.org/papers/volume11/ojala10a/ojala10a.pdf>`_.
1142+
Ojala and Garriga. `Permutation Tests for Studying Classifier
1143+
Performance
1144+
<http://www.jmlr.org/papers/volume11/ojala10a/ojala10a.pdf>`_. The
1145+
Journal of Machine Learning Research (2010) vol. 11
11361146
11371147
"""
11381148
X, y, groups = indexable(X, y, groups)

0 commit comments

Comments
 (0)
0