* 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
* 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
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.
* fix cross_val_predict for binary classification in decision_function
* Add unit tests
* Add unit tests
* Add unit tests
* better fix
* fix conflict
* fix broken
* only calculate n_classes if one of 'decision_function', 'predict_proba', 'predict_log_proba'
* add test for SVC ovo in cross_val_predict
* flake8 fix
* fix case of ovo and imbalanced folds for binary classification
* change assert_raises to assert_raise_message for ovo case
* fix flake8 linetoo long
* add comments and clearer tests
* improve comments and error message for OvO
* fix .format error with L
* use assert_raises_regex for better error message
* raise error in decision_function special cases. change predict_log_proba missing classes to minimum numpy value
* fix broken tests due to special cases of decision_function
* add modified test for decision_function behavior that does not trigger edge cases
* fix typos
* fix typos
* escape regex .
* escape regex .
* address comments. one unaddressed comment
* simplify code
* flake
* wrong classes range
* address comments. adjust error message
* add warning
* change warning to runtimewarning
* add test for the warning
* Use assert_warns_message rather than assert_warns
Other minor fixes
* Note on class-absent replacement values
* Improve error message