Commit Graph

221 Commits

Author SHA1 Message Date
Prabakaran Kumaresshan 41aa3edd78 MNT Remove build_tools/windows/windows_testing_downloader.ps1 (#12974) 2019-01-15 09:28:51 +01:00
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
Wenhao Zhang 581752012c ENH refit=callable in *SearchCV adds flexibility in identifying the best estimator (#11354) 2019-01-09 12:56:30 +11:00
Roman Yurchak 701144559f MAINT Remove unused utils.fixes (#12928)
This continues the work done in https://github.com/scikit-learn/scikit-learn/pull/12639 on dropping the python 2 support by,
 - ~~removing unnecessary `from __future__` imports~~
 - removing unused `sklearn.utils.fixes` assuming we can agree in https://github.com/scikit-learn/scikit-learn/issues/12927 that `sklearn.utils.fixes` are private as was stated e.g. in https://github.com/scikit-learn/scikit-learn/issues/6616#issuecomment-245109979
2019-01-08 12:43:49 +11:00
Roman Yurchak acb8106472 MNT Use list and dict comprehension (#12668) 2019-01-08 09:32:34 +11:00
Hanmin Qin 6dd6af78eb TST Use match instead of message in pytest.raises (#12933) 2019-01-07 15:20:11 +01:00
Roman Yurchak 684d8a221d MAINT Use set litterals when possible (#12667) 2019-01-06 19:21:45 +08:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Dowon 0e5feb6bf7 DOC improving import convenience in class examples (#12846) 2018-12-23 09:37:43 +08:00
Dror Atariah 440c08684f FIX Add more validation for size parameters in train_test_split (#12733)
* 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
2018-12-19 12:36:53 +01:00
bertrandhaut 2aa902207c DOC bad link in ParameterGrid documentation (#12828) 2018-12-19 19:28:21 +08:00
Adrin Jalali 2bd87f6ed8 Remove python < 3.5 from CI (#12746) 2018-12-14 10:53:12 +01:00
Bartosz Michałowski fa98a72dcc MNT Replaced all occurrences of assert_true and assert_false with assert (#12588) 2018-11-28 09:16:26 +08:00
Hanmin Qin 69c5dd9d85 TST Specify random seed in test_shuffle_kfold_stratifiedkfold_reproducibility (#12674) 2018-11-27 21:17:49 +01:00
Marc Torrellas c49a5bf8a8 DOC Fixed whatsnew and tiny docstring fix (#12669) 2018-11-27 12:49:58 +11:00
Marc Torrellas f6f7e3cfd3 [MRG + 2] Print train scores in _fit_and_score (#12613)
* 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
2018-11-21 20:22:24 -05:00
Thomas Moreau d25da1be20 FIX make joblib utils private, and remove mentions of externals.joblib (#12345) 2018-11-20 10:53:52 +11:00
Sam Waterbury 1d579556d2 DOV consistency of parameters for GroupKFold and LeaveOneGroupOut (#12581) 2018-11-18 10:05:48 +11:00
Quentin Batista 4b78d7abf4 DOC: Clarify `cv` parameter description in `GridSearchCV` (#12495)
#### 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
2018-11-12 15:10:15 -05:00
Yaroslav Halchenko 362cb3bcab TST autoreplace assert_true(...==...) with plain assert (#12547) 2018-11-11 09:05:34 +08:00
Nicolas Hug 4e2da4af92 [MRG] Added FutureWarning in sgd models for tol parameter (#12399)
* 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
2018-10-24 11:00:43 -04:00
Andreas Mueller 0f94f2962b
MNT simple deprecations and removals for 0.21 (#12238)
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.
2018-10-11 14:56:37 -04:00
Roman Yurchak e0e7387606 Remove unused private functions (#12253) 2018-10-03 21:08:17 -04:00
Andreas Mueller fb7be879a3 [MRG + 1] return_train_score deprecation (#12241) 2018-10-03 19:24:14 +02:00
Adrin Jalali 239482ffdf BaseSearchCV._run_search raises NotImplementedError instead of being an abstractmethod (#12182)
* _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
2018-09-28 13:49:58 -04:00
Hanmin Qin b915ca6fd8
MNT Avoid using "is" when comparing strings (#12168) 2018-09-26 14:32:09 +08:00
Guillaume Lemaitre 5431a1a9bf BUG: check equality instead of identity in check_cv (#12155) 2018-09-25 19:00:27 +08:00
Roman Yurchak ec69171d52 TST Use pytest.raises instead of legacy constructions (#12057) 2018-09-13 13:57:43 +02:00
Adrin Jalali 36536c6f46 MAINT Fix invalid escape sequence (#12064) 2018-09-13 17:08:23 +08:00
William de Vazelhes a0418215fe TST FIX use match rather than message in pytest.raises (#12001)
Previously these assertions would pass without matching.
2018-09-05 07:36:15 +10:00
Zijie (ZJ) Poh 41178cd62d DOC Fix: require n_splits > 1 in TimeSeriesSplit (#11937) 2018-08-29 17:51:46 +10:00
Joel Nothman 7ed61a24fe ENH add multi_class='auto' for LogisticRegression, default from 0.22; default solver will be 'lbfgs' (#11905)
* 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
2018-08-26 23:00:02 +03:00
Andreas Mueller a43e94c47f RFC try to warn on iid less often (#11613) 2018-08-22 08:59:46 +08:00
Hanmin Qin 9b8fd0b0d0 DOC Correct default n_jobs & reference the glossary (#11808)
Also improves the glossary entry for n_jobs.
2018-08-18 19:57:10 +10:00
Samuel Bell fbb8bd3554 DOC Update references to best_parameters_ in GridSearchCV (#11828) 2018-08-16 09:59:13 +08:00
Hanmin Qin 5533deb8e0 [MRG] FIX Support cv=None in *CV (#11761) 2018-08-07 11:53:59 +10:00
Joel Nothman 477c921c0f
ENH extending BaseSearchCV with a custom search strategy (#9599) 2018-08-06 08:18:48 +10:00
Olivier Grisel 40e6c43cb4
Joblib 0.12.2 (#11741)
* joblib 0.12.2

* Export _joblib's register_parallel_backend

* Use latest version of coverage
2018-08-03 12:34:25 +02:00
Samuel O. Ronsin 6b38970fce ENH Expose errors_score in cross_validate and cross_val_score (#11583) 2018-07-27 12:27:16 +10:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Alexandre Boucaud f158e2dfe2 [MRG+1] Change CV defaults to 5 (#11557)
* 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
2018-07-19 14:46:11 +02:00
Andreas Mueller 8e2c2aa35d
raise DeprecationWarnings and FutureWarnings as errors (#11570)
Towards #11252.
In the end we'd like to make these errors so we can keep this cleaner in the future.
2018-07-17 15:31:45 -05:00
Joel Nothman 14e7c328df Restructure access to vendored/site Joblib (#11471)
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`.
2018-07-17 18:02:11 +02:00
Roman Yurchak c09352c241 [MRG] Fix DeprecationWarning due to collections.abc in Python 3.7 (#11431)
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.
2018-07-14 15:14:02 -05:00
Gael Varoquaux 106bb9e7f5 MAINT: option to unvendor joblib (#11166) 2018-06-29 16:35:45 +02:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Joel Nothman 14764061f8
[MRG] DOC fix some sphinx warnings (#11241) 2018-06-21 20:43:21 +10:00
jeremiedbb 0d8a04bd17 [MRG+1] SimpleImputer(strategy="constant") (#11211) 2018-06-20 17:20:33 +02:00
Matthias Feurer 768ff4d1b7 ENH Add refit_time_ attribute to model selection (#11310) 2018-06-20 12:51:37 +10:00
Andrew Peng f1a3312cd7 FIX #11215 : Changing return in docstring to yields for generator functions (#11276) 2018-06-15 21:50:01 +00:00