Commit Graph

369 Commits

Author SHA1 Message Date
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02: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
Thomas Moreau d25da1be20 FIX make joblib utils private, and remove mentions of externals.joblib (#12345) 2018-11-20 10:53:52 +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
Hanmin Qin 43e3a02085
MNT Remove unused assert_true imports (#12560) 2018-11-11 11:08:37 +08: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
Nicolas Hug b725921832 [MRG] Created 'cross-validation estimator' entry in glossary (#11661)
* Created 'cross-validation estimator' in glossary and referenced it where
needed

* Addressed adrinjalali comments

* updated glossary entry

* updaed docstrings according to commets
2018-10-04 09:43:47 -04: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
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
Naoya Kanai c1738a38a5 MNT update Travis dependencies to latest available versions (#11714) 2018-08-14 08:23:06 +10:00
Adrin Jalali dd700f44df MNT hasattr->getattr on coef_ (#11698) 2018-08-12 17:20:14 +10:00
Brent Yi e28a57747f Add min_features_to_select parameter to RFECV (#11293) 2018-08-09 08:44:36 +03: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
Adrin Jalali 360fc0775d DOC univariate_selection examples in docstrings (#11720) 2018-08-01 08:22:39 +10:00
Nicolas Hug 813d7de9b4 DOC Added docstring checks for feature_selection, kernel_approximation and neighbors modules (#11421) 2018-07-20 08:24:39 +10: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
annaayzenshtat 2242c59fc8 [MRG] EHN: Change default n_estimators to 100 for random forest (#11542)
<!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->

#### 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
-->
Fixes #11128.

#### What does this implement/fix? Explain your changes.
Issues deprecation warning message for the default n_estimators parameter for the forest classifiers. Test added for the warning message when the default parameter is used.

#### Any other comments?


<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->
2018-07-17 14:42:59 -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
Nihar Sheth 211ded8fbc [MRG+1] Select k-best features in SelectFromModel (#9616)
#### Reference Issue
Continuation of work from [PR #6717](https://github.com/scikit-learn/scikit-learn/pull/6717).


#### What does this implement/fix? Explain your changes.
Will merge in master (this branch is a year old) and make changes as discussed in previous PR discussion to make it ready for merging in.
2018-07-16 14:15:25 -05:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Roman Yurchak f049ec72eb TST Pytest parametrization part3 - feature_extraction, gaussian_process modules (#11143) 2018-06-04 22:23:29 +08:00
Nick Hoh 1755b893df [MRG+2] Fix edge case of tied CV scores in RFECV (#9222)
* Fix edge case of tied CV scores in RFECV

In the feature_selection module, RFECV selects the model with the
highest cross-validation score. In the event of CV score ties, one
expects RFECV to return the best model with the fewest features.
This fix addresses such an edge case where two or more models have
identical cross-validation scores.

* Adding an entry to what's new addressing bug fix in RFECV edge case

* Re-add what's new entry

* Use double backticks in whats_new entry
2018-05-24 12:03:29 -04:00
Loïc Estève 20661b5018
TST: only run doctests on numpy 1.14. (#10835)
Fix doctests due to numpy 1.14 formatting changes.
2018-03-27 07:44:40 +02:00
Loïc Estève 4e56f82c30
MAINT: fix typo in thresholds (#10788) 2018-03-09 19:25:58 +01:00
Stefan van der Walt 9960b43c9c DOC Fix typo in `f_regression` (#10765) 2018-03-07 18:21:25 +11:00
Joel Nothman c3bdc0a89a
DOC clean up assorted type specifications (#10441) 2018-01-11 09:11:17 +11:00
Adam Greenhall 48b82a6ff5 [MRG+1] add groups support to RFECV (#9656) 2017-11-17 16:35:49 +01:00
srajan paliwal 3d1b786546 [MRG] Fix LogisticRegression see also should include LogisticRegressionCV(#9995) (#10022) 2017-10-27 13:10:47 +02:00
Loïc Estève 433b00a0de DOC add missing dot in docstring 2017-10-24 11:36:07 +02:00
Artiem K 2109c3776b ENH Add verbose level into the RFE at the end of RFECV (#9848) 2017-10-03 14:25:18 +11:00
Albert Thomas 45dc891c96 [MRG+2] Clean common tests (#9340)
* rm dupes

* add check_supervised_y_no_nan in classifier checks: this implies changes for Ridge classifiers

* fix docstrings/comments

* FIX check fitting 1d X array raises error and FIX check fitting 2d array with only 1 feature either works or returns informative message

* modify check_fit2d_1sample in common tests so that it checks fitting either works or returns an informative message

* rm SpectralClustering case for the moment

* uniformize error messages for 1 sample case and fix SpectralClustering with ensure_min_samples=2

* add unit test for mean_shift when n_samples * quantile < 1

* FIX travis with ensure_min_samples=2 in _PLS

* try fix for failing tSNE test

* typos

* take @agramfort's review into account

* sc to fix string in gaussian_process

* add the class that is present to preserve information of previous message in gpc.py
2017-09-26 18:13:15 +02:00
Joel Nothman 49af61cb42 TST Improve SelectFromModel tests (#9733)
Should fix one of the issues in #9393
2017-09-20 17:29:42 +02:00
Bastian Venthur 7400775633 [MRG+1] MAINT Replace assert_array_equal with -assert_array_almost_equal where necessary. (#9774) 2017-09-18 19:55:23 +10:00
Loïc Estève 9ebdea2cfa COSMIT minor docstring change 2017-09-04 09:47:48 +02:00
Hanmin Qin b03abf1985 [MRG+1] DOC improve RFE/RFECV estimator docstring (#9233) 2017-07-27 14:39:42 +02:00
Sam Shleifer 51c8c16197 [MRG+1] RFE can raise NotFittedError (#9283)
* RFE can raise NotFittedError

* boom boom

* dont change tests

* tests pass

* remove two extra lines
2017-07-06 01:09:10 -07:00
Sebastin Santy dc43486806 Remove unused imports (#9235) 2017-07-01 05:57:54 -07:00
James Bourbeau c5c51c6c40 Updates SelectFromModel docstring to detail supported estimators (#9238)
* Updates SelectFromModel docstring

* Updates docstring
2017-06-28 13:39:27 +10:00
Hanmin Qin 28c8c4a4b5 [MRG] DOC update comment of RFE._fit (#9226) 2017-06-26 22:27:54 +10:00
Tom Dupré la Tour edeb3af217 Deprecate n_iter in SGDClassifier and implement max_iter (#5036) 2017-06-23 21:49:29 +02:00
Taehoon Lee ebf2bf8107 Fix typos (#9205) 2017-06-23 11:43:46 +02:00
Thomas Moreau 8dde4096bd [MRG] ENH make rng seed thread safe everywhere it is possible (#9184)
* ENH make rng seed thread safe everywhere it is possible

* ENH remove unneeded use of np.random.seed
2017-06-23 07:40:33 +02:00
Naoya Kanai 6579220588 [MRG+1] Drop NumPy < 1.8 (#8874) 2017-06-07 17:06:06 +02:00
Andreas Mueller 1c41368bac [MRG+1] Uncontroversial fixes from estimator tags branch (#8086)
* some bug fixes.

* minor fixes to whatsnew

* typo in whatsnew

* add test for n_components = 1 transform in dict learning

* feature extraction doc fix

* fix broken test

* revert aggressive input validation changes

* in SelectFromModel, don't store threshold_ in transform. If we called "fit", use estimates from last "fit".

* move score from EllipticEnvelope to OutlierDetectionMixin

* revert changes to Tfidf documentation

* remove dummy input validation from whatsnew

* fix text feature tests

* rewrite from_model threshold again...

* remove stray condition

* fix self.estimator -> estimator, slightly more interesting test

* typo in comment

* Fix issues in SparseEncoder, add tests.
more explicit explanation of SparseEncoder change, add issue numbers to whatsnew

* minor fixes in whats_new.rst

* slightly more consistency with tuples for shapes

* not longer typo
2017-06-06 16:34:47 +02:00
Naoya Kanai bd0fc236e0 [MRG+1] MAINT drop SciPy < 0.13 (#8854)
Remove sklearn.utils.fixes functions that are not needed for scipy >= 0.13 and keep deprecated wrappers in other modules.
2017-06-02 23:36:33 +02:00
Guillaume Lemaitre e3c9ae204f [MRG+1] DOC improve description and consistency of random_state (#8689)
* DOC improve description of random_state in train_test_split

* DOC Make random_state consistent through documentation

* FIX reverse doc mistake

* FIX address comment of Tom

* DOC address comments

* DOC remove empty line

* DOC remove unecessary white spaces
2017-04-05 17:43:21 -07:00
Charlie Brummitt c5ccb72d77 Fix typo: "continious" (#8685)
Change "continious" to "continuous" in the "See also" section of the docstring of `SelectKBest`
2017-04-01 20:29:45 +02:00