-
-
Notifications
You must be signed in to change notification settings - Fork 26k
Added user guide documentation for permutation_test_score #14757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fe91aaf
d839cbb
71bdd72
573d891
096c3be
201dc02
5cf5ae7
cf52380
5252b82
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,6 +300,23 @@ section. | |
* :ref:`sphx_glr_auto_examples_model_selection_plot_cv_predict.py`, | ||
* :ref:`sphx_glr_auto_examples_model_selection_plot_nested_cross_validation_iris.py`. | ||
|
||
|
||
.. _cv_significance_evaluation: | ||
|
||
Cross-validation significance evaluation | ||
---------------------------------------- | ||
|
||
Significance of cross validation scores can be evaluated using the | ||
:func:`permutation_test_score` function. The function returns a p-value, which | ||
approximates the probability that the average cross-validation score would be | ||
obtained by chance if the target is independent of the data. | ||
|
||
It also returns cross validation scores for each permutation of y labels. It | ||
permutes the labels of the samples and computes the p-value against the null | ||
hypothesis that the features and the labels are independent, meaning that there | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should "features" be "predictions"? Or is this right, if we add "conditioned on the estimator"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Features are the input vectors (X), and thus not predictions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, so you need to add "given the estimator" |
||
is no difference between the classes. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "classes" implies classification, which we aren't necessarily talking about here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function permutes class labels. Isn't classification implied in that case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it peemutes target values for each sample, not class labels |
||
|
||
|
||
Cross validation iterators | ||
========================== | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talking about return value here confuses the matter if what we want to talk about is how the P value is constructed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is for user guide. The function description and the paper cited give more details about how the p-value is constructed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ordinarily our user guide is less focused on API things like what the function returns. Conversely, a description of how the algorithm works belongs in the user guide not in the docstring.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, we're trying to get all of the PR's from the WiMLDS sprint wrapped up, are we waiting on @aditi9783, or approval from another reviewer? Thanks!
Not completely sure what's going on with this one @reshamas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kellycarmody We are waiting on @aditi9783
@aditi9783 We use the user guide to explain the math with the details necessary to explain the function. The function's docstring is usually brief and links to the user guide. In this case, moving most of the docstring into the user guide would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @thomasjpfan, @reshamas asked me to take over this PR, but I see that Nicolas Hug already approved the changes, and it is just waiting for one more reviewer.
Is the PR good? Or should I move most of the docstring into the user guide?