* Fixed typo in an example
* Removed un-needed lines from example
* Added tests on the validity of parameters
* Fixed error msg for train_size issue
* Added tests to check the validation of test and train sizes
* Switched to parameterized test
* Fixed typo in error msg
* Swithced to pytest.raises
* Swithced to pytest.raises also when checking msg
* Improved the validity tests and their unit testing
* print train scores when verbose > 3 in _fit_and_score
* train_scores computed if verbose > 3, and 3 decimals places only
* flake8 warnings solved
* print train score if return_train_score
test coverage increased
* added test for multimetric;
tests cleaned using pytest parametrize
* fixing failed tests for python2...
* revert changes in _scorer
* modified whats_new
* modified whats_new again
#### Reference Issues/PRs
<!--
Example: Fixes#1234. See also #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 #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#12466
* Added ChangedBehaviorWarning in sgd models
if tol is None while max_iter is set
* Changed to FutureWarning and clarified None meaning
* Ignored warningin tests
* Ignore warnings in tests, round 2
Part of #11992.
These were all the things that seemed pretty straight-forward. It's actually a bit bulky but should still be easy to review, hopefully.
* _run_search raises NotImplementedError instead of being and abstractmethod
* add error message
* test for a BaseSearchCV child w/o a _run_search
* make the test python2 compatible, still in 0.20 zone.
* specify cv in tests not to trigger the related FutureWarning
* PEP8
* Change default solver in LogisticRegression
* This is an API change, not a feature
* Decrease numerical precision in LogisticRegression doctest
* ENH add multi_class='auto' for LR, default from 0.22
* No warning when binary
* add FutureWarning for methods with defaults=3
* add explicit cv values to fix assertion errors
* add tests for catching the FutureWarning
* Write current deprecation version
* Add deprecation in docstring
* change default cv value to None
* change cv from 3 to 5 in the examples
* upgrade doctests
* update doctest in tutorial
* update doctest in cross-validation doc
* fix tests
* add entry to whats new
* address Gael comments
* address Gael comments 2
* fix wrong indentation
* update doc
* add docstring deprecation warning in CV subclasses
* address Andy's comments
* fix PR number
* fix flake8
* add filterwarnings in tests
* fix doctests
* cv=None mendatory in Ridge
* fix warning related errors
* skip some doctests warnings
* make travis happy
* change from deprecated to versionchanged
* fix doctests and remove skipping
* address comments
In order to fix#11408, this swaps `joblib` and `_joblib`. It however, allows users to access joblib's `Memory` or `Parallel` functionality without accessing `sklearn.externals._joblib` by importing `Memory`, `Parallel`, etc. into `sklearn.utils`.
Closes https://github.com/scikit-learn/scikit-learn/issues/11121
This PR removes the deprecation warning about ABC being moved from `collections` to `collections.abc` when importing scikit-learn in Python 3.7.
In the end, I put `collections.abc.{Sequence, Iterable, Mapping, Sized}` in the namespace of `sklearn.utils.fixes`. This was the simplest way I could find, and while it has the drawback of obfuscating the real module name, other approached appeared more problematic and a similar approach is currently used e.g. for `utils.fixes.signature` which is an alias for `inspect.signature`.
We can't just patch six with https://github.com/benjaminp/six/pull/241, because sklearn uses six from 5 years ago, which would need updating and I'm not sure if it could have side effects (e.g. for pickling backward compatibility etc).
**Edit**: This adds a test checking that generally no warnings are raised when importing scikit-learn top-level modules.