Commit Graph

232 Commits

Author SHA1 Message Date
Rüdiger Busche d300f406ae MAINT Simplify super() calls (#12812) 2019-01-10 22:27:06 +01:00
Nicolas Hug 0a07364abd ENH Added penalty='none' to LogisticRegression (#12860) 2019-01-10 09:26:30 +11: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
Reshama Shaikh cd8fe168fb DOC Added description for classes_ in LogisticRegression/LogisticRegressionCV documentation (#12795) 2018-12-17 15:15:24 +08: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
Joel Nothman 1128094271 BLD we should ensure continued support for joblib 0.11 (#12350) 2018-11-06 22:10:23 +01:00
Adrin Jalali 00c2f411cf DOC fix logistic regression.fit docstring on y (#12343) 2018-10-10 22:57:11 +11:00
TakingItCasual 1e052e9da9 Converting http to https (2)... (#12292) 2018-10-04 23:06:14 +02: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
Roman Yurchak c3915c0995 MAINT Fix effective_n_jobs in LogisticRegression (#11803) 2018-08-14 10:55:44 +08:00
Oren Milman 38e7c8b117 fix the docstring (#11788) 2018-08-10 11:26:47 -07:00
Adrin Jalali fc521a04fd DOC added LogisticRegression(CV) examples (#11735) 2018-08-06 21:21:20 +08: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
Hanmin Qin eb453b6307 DOC Format in LogisticRegression/LogisticRegressionCV 2018-08-03 11:46:41 +08:00
Nicolas Hug e500447596 [MRG] Fixed bug in _log_reg_scoring_path for multinomial case (#11724) 2018-08-02 15:50:34 +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
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
Dillon Gardner 8bc77f4f25 Logistic lgbf verbosity (#11535)
* Map verbosity to specific iprint values
2018-07-17 22:34: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
Joel Nothman a7e17117bb [MRG] Large sparse matrix support (#11327) 2018-06-25 15:15:11 +00:00
aishgrt1 97a15dbad3 Fix LogisticRegression with warm_start, multinomial and binary data (#10986) 2018-06-24 08:51:06 +10:00
Joel Nothman 14764061f8
[MRG] DOC fix some sphinx warnings (#11241) 2018-06-21 20:43:21 +10:00
Joel Nothman cd8c01d4e4 COSMIT fix syntax quirk 2018-06-20 22:16:15 +10:00
Thomas Fan c75bccf43e FIX Uses self.scoring for score function (#11192) 2018-06-17 22:54:36 +08:00
Kasper Primdal Lauritzen 1de5b1ced2 DOC Formatting in logistic.py solver parameter (#10975) 2018-04-14 21:25:56 +08: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
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 25b67ba404 [MRG+1] MAINT: remove scipy <= 0.12 specific code in LogisticRegresssion (#10704)
* MAINT: 'nit' has been available since scipy 0.12

* Remove more dead code.

maxiter param was added in scipy 0.12.
2018-02-27 08:14:31 +11:00
Mohamed Ali Jamaoui 58f84694a8 DOC Add reference to the glossary in the warm_start parameter description of public APIs (#10699) 2018-02-26 20:21:17 +08:00
jotasi 7700b5ac73 [MRG+1] FIX: Use ConvergenceWarning whenver it applies (#10306) 2018-02-10 05:16:08 -08:00
Joel Nothman c3bdc0a89a
DOC clean up assorted type specifications (#10441) 2018-01-11 09:11:17 +11:00
Tom Dupré la Tour 26e526da43 DOC fix incorrect docstring in logistic_regression_path 2018-01-09 12:04:53 +01:00
Rob 4dafa52eb0 FIX incorrect `predict_proba` for `LogisticRegression` in binary case using `multinomial` parameter. (#9939) 2018-01-07 07:50:43 +11:00
srajan paliwal 3d1b786546 [MRG] Fix LogisticRegression see also should include LogisticRegressionCV(#9995) (#10022) 2017-10-27 13:10:47 +02:00
Sam Radhakrishnan d9eba751bd Fix LogisticRegressionCV default solver value in docstring (#9962) 2017-10-20 15:02:48 +02:00
James Bourbeau e1fb03c86d [MRG] FIX Updates LogisticRegressionCV to use get_scorer (#9565) 2017-08-16 20:05:04 +10:00
(Venkat) Raghav, Rajagopalan b6f8865b0a [MRG + 1 (rv) + 1 (alex) + 1] Add a check to test the docstring params and their order (#9206)
* add automatic test of docstrings for function / method signatures using numpydoc
2017-07-11 18:42:10 +02:00
Guillaume Lemaitre 2c20b0b769 [MRG+1] improved docstring for the `n_jobs` parameter of LogisticRegression (#9159)
* improved docstring for the `solver` parameter of LogisticRegression

* further improve docstring on `n_jobs` and `solver`

* added warning when self.solver == 'liblinear' & self.n_jobs != -1

in LogisticRegression

* corrected typo: warning => warnings

* TST/DOC reverse doc and add test
2017-06-19 13:00:43 +02:00
Naoya Kanai 95aa2952e1 Add logsumexp and comb to utils.fixes (#9046) 2017-06-10 15:01:02 +02:00
Abhyuday Pratap Singh ccff672682 LogisticregressionCV docs(#8424): documented C_ shape (#8434) 2017-06-07 10:22:14 +02:00
Joan Massich 39a46586fc [MRG+2] LogisticRegression convert to float64 (newton-cg) (#8835)
* Add a test to ensure not changing the input's data type

Test that np.float32 input data is not cast to np.float64 when using LR + newton-cg

* [WIP] Force X to remain float32. (self.coef_ remains float64 even if X is not)

* [WIP] ensure self.coef_ same type as X

* keep the np.float32 when multi_class='multinomial'

* Avoid hardcoded type for multinomial

* pass flake8

* Ensure that the results in 32bits are the same as in 64

* Address Gael's comments for multi_class=='ovr'

* Add multi_class=='multinominal' to test

* Add support for multi_class=='multinominal'

* prefer float64 to float32

* Force X and y to have the same type

* Revert "Add support for multi_class=='multinominal'"

This reverts commit 4ac33e8c02.

* remvert more stuff

* clean up some commmented code

* allow class_weight to take advantage of float32

* Add a test where X.dtype is different of y.dtype

* Address @raghavrv comments

* address the rest of @raghavrv's comments

* Revert class_weight

* Avoid copying if dtype matches

* Address alex comment to the cast from inside _multinomial_loss_grad

* address alex comment

* add sparsity test

* Addressed Tom comment of checking that we keep the 64 aswell
2017-06-07 08:10:37 +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
Arthur Mensch 5147fd09c6 Add SAGA solver for LogisticRegression and Ridge (#8446) 2017-03-27 21:39:30 +02:00
Vivek Kumar c45f52c218 DOC Updated documentation for scoring parameter (#8346)
Updated documentation for scoring parameter of LogisticRegressionCV to make it consistent with GridSearchCV documentation. Fixes #8333
2017-02-13 21:28:53 +11:00
Aman Dalmia c5bcdde895 TST: added test that sample_weight can be a list (#8261) 2017-02-03 18:54:30 +11:00