DOC: Clarify cv parameter description in GridSearchCV#12495
DOC: Clarify cv parameter description in GridSearchCV#12495amueller merged 7 commits intoscikit-learn:masterfrom
cv parameter description in GridSearchCV#12495Conversation
- Rewrite the parameter description - Link the `CV splitter` description to an existing example - Add an example with a custom iterable
jnothman
left a comment
There was a problem hiding this comment.
This is relevant to all other *CV and cross validation functions... This pull request should change many docstrings if it changes one
sklearn/model_selection/_search.py
Outdated
| - integer, to specify the number of folds in a `(Stratified)KFold`, | ||
| - An object to be used as a cross-validation generator. | ||
| - An iterable yielding train, test splits. | ||
| - A :term:`CV splitter <CV splitter>` object. See |
There was a problem hiding this comment.
:term:`CV splitter` should be sufficient
sklearn/model_selection/_search.py
Outdated
| - A :term:`CV splitter <CV splitter>` object. See | ||
| :ref:`sphx_glr_auto_examples_svm_plot_rbf_parameters.py` for | ||
| an example. | ||
| - An iterable yielding train, test splits as arrays of indices. |
sklearn/model_selection/_search.py
Outdated
| 'split2_test_score', ... | ||
| 'std_fit_time', 'std_score_time', 'std_test_score'] | ||
|
|
||
| >>> from sklearn import svm, datasets |
There was a problem hiding this comment.
This rather belongs in doc/modules/grid_search.rst or
../cross_validation.rst or doc/glossary.rst if not covered in those already
…ption the `cv` parameter.
|
@jnothman Thanks for your comments! I've made changes to the following CV and cross validation functions in addition to
There are other places where the |
|
There aren't two entries are there, but two terms for one entry? Yes, that
is intended.
|
jnothman
left a comment
There was a problem hiding this comment.
git grep -p "An object to be used as a" shows many more places where you should make this change.
sklearn/calibration.py
Outdated
| - integer, to specify the number of folds. | ||
| - An object to be used as a cross-validation generator. | ||
| - An iterable yielding train/test splits. | ||
| - :term:`CV splitter <CV splitter>`, |
There was a problem hiding this comment.
You still shouldn't have that expression in angle brackets. It is unnecessary when the text to display is the same as the link target name
|
@jnothman Thanks for letting me know! Hopefully, everything is now alright. |
…ybutton * upstream/master: DOC: Clarify `cv` parameter description in `GridSearchCV` (scikit-learn#12495)
…rn#12495) #### Reference Issues/PRs <!-- Example: Fixes scikit-learn#1234. See also scikit-learn#3456. Please use keywords (e.g., Fixes) to create link to the issues or pull requests you resolved, so that they will automatically be closed when your pull request is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests --> This PR addresses issue scikit-learn#12466. #### What does this implement/fix? Explain your changes. This PR does the 3 following things: - Rewrite the `cv` parameter description in `GridSearchCV` - Link the new `CV splitter` description to an existing example - Add an example with a custom iterable Thanks for reviewing this! Close scikit-learn#12466
…ikit-learn into add_codeblock_copybutton * 'add_codeblock_copybutton' of https://github.com/thoo/scikit-learn: Move an extension under sphinx_copybutton/ Move css/js file under sphinxext/ Fix max_depth overshoot in BFS expansion of trees (scikit-learn#12344) TST don't test utils.fixes docstrings (scikit-learn#12576) DOC Fix typo (scikit-learn#12563) FIX Workaround limitation of cloudpickle under PyPy (scikit-learn#12566) MNT bare asserts (scikit-learn#12571) FIX incorrect error when OneHotEncoder.transform called prior to fit (scikit-learn#12443) Retrigger travis:max time limit error DOC: Clarify `cv` parameter description in `GridSearchCV` (scikit-learn#12495) FIX remove FutureWarning in _object_dtype_isnan and add test (scikit-learn#12567) DOC Add 's' to "correspond" in docs for Hamming Loss. (scikit-learn#12565) EXA Fix comment in plot-iris-logistic example (scikit-learn#12564) FIX stop words validation in text vectorizers with custom preprocessors / tokenizers (scikit-learn#12393) DOC Add skorch to related projects (scikit-learn#12561) MNT Don't change self.n_values in OneHotEncoder.fit (scikit-learn#12286) MNT Remove unused assert_true imports (scikit-learn#12560) TST autoreplace assert_true(...==...) with plain assert (scikit-learn#12547) DOC: add a testimonial from JP Morgan (scikit-learn#12555)
…rn#12495) #### Reference Issues/PRs <!-- Example: Fixes scikit-learn#1234. See also scikit-learn#3456. Please use keywords (e.g., Fixes) to create link to the issues or pull requests you resolved, so that they will automatically be closed when your pull request is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests --> This PR addresses issue scikit-learn#12466. #### What does this implement/fix? Explain your changes. This PR does the 3 following things: - Rewrite the `cv` parameter description in `GridSearchCV` - Link the new `CV splitter` description to an existing example - Add an example with a custom iterable Thanks for reviewing this! Close scikit-learn#12466
…rn#12495) #### Reference Issues/PRs <!-- Example: Fixes scikit-learn#1234. See also scikit-learn#3456. Please use keywords (e.g., Fixes) to create link to the issues or pull requests you resolved, so that they will automatically be closed when your pull request is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests --> This PR addresses issue scikit-learn#12466. #### What does this implement/fix? Explain your changes. This PR does the 3 following things: - Rewrite the `cv` parameter description in `GridSearchCV` - Link the new `CV splitter` description to an existing example - Add an example with a custom iterable Thanks for reviewing this! Close scikit-learn#12466
…rn#12495) #### Reference Issues/PRs <!-- Example: Fixes scikit-learn#1234. See also scikit-learn#3456. Please use keywords (e.g., Fixes) to create link to the issues or pull requests you resolved, so that they will automatically be closed when your pull request is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests --> This PR addresses issue scikit-learn#12466. #### What does this implement/fix? Explain your changes. This PR does the 3 following things: - Rewrite the `cv` parameter description in `GridSearchCV` - Link the new `CV splitter` description to an existing example - Add an example with a custom iterable Thanks for reviewing this! Close scikit-learn#12466
…rn#12495) #### Reference Issues/PRs <!-- Example: Fixes scikit-learn#1234. See also scikit-learn#3456. Please use keywords (e.g., Fixes) to create link to the issues or pull requests you resolved, so that they will automatically be closed when your pull request is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests --> This PR addresses issue scikit-learn#12466. #### What does this implement/fix? Explain your changes. This PR does the 3 following things: - Rewrite the `cv` parameter description in `GridSearchCV` - Link the new `CV splitter` description to an existing example - Add an example with a custom iterable Thanks for reviewing this! Close scikit-learn#12466
…ikit-learn#12495)" This reverts commit 6878a70.
…ikit-learn#12495)" This reverts commit 6878a70.
…rn#12495) #### Reference Issues/PRs <!-- Example: Fixes scikit-learn#1234. See also scikit-learn#3456. Please use keywords (e.g., Fixes) to create link to the issues or pull requests you resolved, so that they will automatically be closed when your pull request is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests --> This PR addresses issue scikit-learn#12466. #### What does this implement/fix? Explain your changes. This PR does the 3 following things: - Rewrite the `cv` parameter description in `GridSearchCV` - Link the new `CV splitter` description to an existing example - Add an example with a custom iterable Thanks for reviewing this! Close scikit-learn#12466
Reference Issues/PRs
This PR addresses issue #12466.
What does this implement/fix? Explain your changes.
This PR does the 3 following things:
cvparameter description inGridSearchCVCV splitterdescription to an existing exampleThanks for reviewing this!
Close #12466