Commit Graph

717 Commits

Author SHA1 Message Date
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
Albert Thomas 0eda10a598 FIX Bayesian ridge regression: returned values to match last update (#12174) 2019-01-10 21:36:03 +11:00
Nicolas Hug 0a07364abd ENH Added penalty='none' to LogisticRegression (#12860) 2019-01-10 09:26:30 +11:00
Hanmin Qin 6dd6af78eb TST Use match instead of message in pytest.raises (#12933) 2019-01-07 15:20:11 +01:00
Andreas Mueller 952ef6637a MRG Drop legacy python / remove six dependencies (#12639) 2019-01-03 15:50:05 +02:00
Nicolas Hug 55a98ab7e3 [MRG+1] Deprecated logistic_regression_path (#12821)
<!--
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
-->

Closes #12798 

#### What does this implement/fix? Explain your changes.

This PR deprecates the use of `logistic_regression_path` and makes it private.

#### 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-12-19 16:52:54 -05: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
Nicolas Hug fe35e253ae [MRG] Fixed randomness of test_logreg_cv_penalty (#12624)
* fixed randomness of test_logreg_cv_penalty

* Added comment about warm-starting coefficients
2018-11-25 21:16:30 +01:00
Nicolas Hug c1f58745be [MRG] Add elastic net penalty to LogisticRegression (#11646)
* First draft on elasticnet penaly for LogisticRegression

* Some basic tests

* Doc update

* First draft for LogisticRegressionCV.

It seems to be working for binary classification and for multiclass when
multi_class='ovr'. I'm having a hard time figuring out the intricacies
of multi_class='multinomial'.

* Changed default to None for l1_ratio.

added warning message is user sets l1_ratio while penalty is not
elastic-net

* Some more doc

* Updated example to plot elastic net sparsity

* Fixed flake8

* Fixed test by not modifying attribute in fit

* Fixed doc issues

* WIP

* Partially fixed logistic_reg_CV for multinomial.

Also added some comments that are hopefully clear.
Still need to fix refit=False

* Fixed doc issue

* WIP

* Fixed test for refit=False in LogisticRegressionCV

* Fixed Python 2 numpy version issue

* minor doc updates

* Weird doc error...

* Added test to ensure that elastic net is at least as good as L1 or L2
once l1_ratio has been optimized with grid search

Also addressed minor reviews

* Fixed test

* addressed comments

* Added back ignore warning on tests

* Added a functional test

* Scale data in test... Now failing

* elastic-net --> elasticnet

* Updated doc for some attributes and checked their shape in tests

* Added l1_ratio dimension to coefs_paths and scores attr

* improve example + fix test

* FIX incorrect lagged_update in SAGA

* Add non-regression test for SAGA's bug

* FIX flake8 and warning

* Re fixed warning

* Updated some tests

* Addressed comments

* more comments and added dimension to LogisticRegressionCV.n_iter_ attribute

* Updated whatsnew for 0.21

* better doc shape looks

* Fixed whatnew entry after merges

* Added dot

* Addressed comments + standardized optional default param docstrings

* Addessed comments

* use swapaxes instead of unsupported moveaxis (hopefully fixes tests)
2018-11-21 20:23:57 -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
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
Joel Nothman 1128094271 BLD we should ensure continued support for joblib 0.11 (#12350) 2018-11-06 22:10:23 +01:00
Pierre Glaser f24e3000b8 Impose shared memory when fitting a SGDClassifier (#12498) 2018-11-05 15:38:15 +01:00
Yaroslav Halchenko 6226cf59ad TST skip test_backend_respected if joblib is forced into serial mode (#12496) 2018-11-02 23:10:57 +01: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
joaak 3c76b9c425 FIX 'MultiTaskLasso' object has no attribute 'coef_' when warm_start = True (#12361) 2018-10-21 19:43:09 +11: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
Olivier Grisel 7d72720ee8
[MRG] Crash when using SGDClassifier with early stopping in a parallel grid search (#12122) 2018-09-26 12:04:11 +02:00
Joel Nothman b24ef3631a FIX xfail for MacOS LogisticRegressionCV stability (#11936) 2018-08-29 10:41:52 +03: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
Roman Yurchak b42a5152af MAINT Fix test_logistic::test_dtype_match failure on 32 bit arch (#11899) 2018-08-25 11:54:30 +08:00
Kuai Yu 7ba7a4a1c2 Style improvements to least_angle.py (#11703) 2018-08-06 11:10:42 +02:00
Nicolas Hug e500447596 [MRG] Fixed bug in _log_reg_scoring_path for multinomial case (#11724) 2018-08-02 15:50:34 +02:00
jakirkham b3c177cf2c [MRG] MNT: Optionally skip another input check in ElasticNet, Lasso (#11487) 2018-07-27 13:41:14 +02:00
ZJ Poh adddf00433 [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
Joan Massich 0b2c0e7d13 TST test_dtype_match failure on windows (#11563) 2018-07-21 11:25:05 +08:00
Guillaume Lemaitre 24890352ab TST: replace ignore_warnings with specific filterwarning in SAG (#11606) 2018-07-19 09:33:57 -07: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
William de Vazelhes 6c4b878684 [MRG] fixes multinomial scoring for LogisticRegressionCV (#11578)
* FIX: fixes multinomial scoring for LogisticRegressionCV

* MAINT: changes according to review https://github.com/scikit-learn/scikit-learn/pull/11578#pullrequestreview-137785752

* MAINT Add what s new entry

* MAINT: Adress comments from review https://github.com/scikit-learn/scikit-learn/pull/11578#pullrequestreview-138098118
2018-07-18 22:08:29 +02:00
Loïc Estève ed0943b438 Use rcond value for np.linalg.lstsq depending on numpy version. (#11612)
This avoids a FutureWarning for rcond default value on numpy >= 1.14.
2018-07-17 18:22:19 -05:00
Andreas Mueller b9330d96c9 pep8 whoops 2018-07-17 17:00:41 -05:00
Loïc Estève e1dd0d85c4 FIX: ensure that category warning are passed as a kwargs in ignore_warnings (#11599) 2018-07-17 22:50:32 +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
Guillaume Lemaitre cba99e0133 [MRG+2] FIX: make the deprecation in fit and not init in IsolationForest (#11574)
* FIX make the deprecation in fit instead than init

* DOC mention version changed

* FIX investigate weird failing test
2018-07-17 14:52:30 -05:00
Sergul Aydore a49649105c [MRG+2] change tol in test ridge (#11587)
* change tol in test ridge

* line too long
2018-07-17 21:09:12 +02: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
Tom Dupré la Tour 0fc7ce6bb8 [MRG+1] Add a stopping criterion in SGD, based on the score on a validation set (#9043) 2018-07-05 16:25:34 +02:00
Andreas Mueller eec7649236 MAINT Complete 0.20 deprecations (#9570) 2018-06-24 23:06:26 +10:00
Joel Nothman 9e5dc00699 TST Fix non-determinism in test_warm_start_converge_LR 2018-06-24 21:44:42 +10:00
aishgrt1 97a15dbad3 Fix LogisticRegression with warm_start, multinomial and binary data (#10986) 2018-06-24 08:51:06 +10:00
Olivier Grisel 174f4aea6e
[MRG] FIX SparseCoder with readonly parallel mmap (#11346) 2018-06-23 12:16:59 +02:00
Thomas Fan c75bccf43e FIX Uses self.scoring for score function (#11192) 2018-06-17 22:54:36 +08:00
Roman Yurchak e8d8b8eeb0 TST: parametrize unit tests (#11074)
yield tests are deprecated in pytest and will be removed in pytest 4.0.
They all have been replaced by parametrize.
2018-06-08 14:59:33 +02:00
Aniruddha Dave 5d9a686be1 FIX: predict_proba and predict_log_proba access before fit in SGDClassifier (#10961) 2018-04-17 07:26:50 +02:00
Alexandre Sevin cd76f9b780 [MRG + 2] Add convergence warning to linear models (#10881)
Make convergence warnings appear when verbose = 0 in liblinear models.
2018-04-02 22:52:50 +10:00
Mabel Villalba eb1a3c4765 FIX Added store_cv_values to RidgeClassifierCV and a test. (#10297) 2018-03-15 18:20:51 +08:00
Mabel Villalba 03dd287015 FIX Fixed error when fitting RidgeCV with integers (#10397) 2018-03-08 23:32:26 +08:00
Joel Nothman 2aba6e2945 FIX n_iter_ should be less than max_iter in when using lbfgs solver(#10723) 2018-03-05 15:05:08 +01:00
Loïc Estève a97e78b01a [MRG] MAINT: remove even more old scipy related code (#10721) 2018-03-01 07:52:10 +11:00