Commit Graph

173 Commits

Author SHA1 Message Date
Thomas J. Fan d4aad64b1e
MNT Update to black 22.3.0 to resolve click error (#22983)
* MNT Update to black 22.3.0 to resolve click error

* STY Update for new black version
2022-03-29 12:04:41 +02:00
Richard Taylor ea290e2d61
TST remove pytest.warns(None) in test_logistic.py (#22877) 2022-03-18 16:16:42 +01:00
Jérémie du Boisberranger d135a0f8db
MNT additional cleaning in test for 1.1 (#22661) 2022-03-03 10:31:02 +01:00
JSchuerz 4a52eb6de9
DOC Use :doi: and :arxiv: directives for references (#22603)
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-03-02 15:15:44 +01:00
Olivier Grisel 4ca4f3bbcd
FIX make the shape of LogisticRegression(solver="liblinear") consistent with other solvers (#21998)
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
2022-02-15 16:40:10 +01:00
Christian Lorentzen d8d5637cfe
ENH Loss module LogisticRegression (#21808)
* ENH replace loss in linear logistic regression

* MNT remove logistic regression's own loss functions

* CLN remove comment

* DOC add whatsnew

* DOC more precise whatsnew

* CLN restore improvements of #19571

* ENH improve fit time by separating mat-vec in multiclass

* DOC update whatsnew

* not only a bit ;-)

* DOC note memory benefit for multiclass case

* trigger CI

* trigger CI

* CLN rename variable to hess_prod

* DOC address reviewer comments

* CLN remove C/F for 1d arrays

* CLN rename to gradient_per_sample

* CLN rename alpha to l2_reg_strength

* ENH respect F-contiguity

* TST fix sag tests

* CLN rename to LinearModelLoss

* CLN improve comments according to review

* CLN liblinear comment

* TST add / move test to test_linear_loss.py

* CLN comment placement

* trigger CI

* CLN add comment about contiguity of raw_prediction

* DEBUG debian-32

* DEBUG test only linear_model module

* Revert "DEBUG test only linear_model module"

This reverts commit 9d6e6987ff.

* DEBUG test -k LogisticRegression

* Revert "DEBUG test -k LogisticRegression"

This reverts commit c203167041.

* Revert "DEBUG debian-32"

This reverts commit ef0b98f232.

* DEBUG set n_jobs=1

* Revert "DEBUG set n_jobs=1"

This reverts commit c7f6f72a8c.

* CLN always use n_threads=1

* CLN address review

* ENH avoid array copy

* CLN simplify L2 norm

* CLN rename w to weights

* CLN rename to hessian_sum and hx_sum

* CLN address review

* CLN rename to init arg and attribute to base_loss

* CLN apply review suggestion

Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>

* CLN base_loss instead of _loss attribute

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
2022-02-14 11:55:17 +01:00
Meekail Zain 9d415dc16d
TST Improved testing logic in `tests/test_logistic.py` (#22314)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2022-02-08 20:08:19 +01:00
Thomas J. Fan 9f85c9d449
TST Better info when checking for no warnings in tests (#22362) 2022-02-03 11:42:48 +01:00
Sultan Orazbayev cd892f9688
DOC use the arxiv directive in the docstrings (#21418)
Co-authored-by: aufarkari <aufar.di.sini@gmail.com>
Co-authored-by: Chiara Marmo <cmarmo@users.noreply.github.com>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2022-01-28 17:55:55 +01:00
Tom Dupré la Tour 762eca546a
FIX improve error message for large sparse matrix input in LogisticRegression (#21093) 2021-09-24 11:05:53 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
qdeffense 1f91b873e4
TST Remove redundant max iter in sklearn/linear_model/tests (#14622)
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-04-08 18:17:49 -04:00
shivamgargsya 5ccfabf08d
TST Change assert from sklearn to pytest style in module linear_model/tests (#19565) 2021-03-12 15:46:50 +01:00
Yasmeen Alsaedy dac560551c
TST replace assert_raise_* by pytest.raises in linear_model (#19440) 2021-02-12 20:52:23 +01:00
Thomas J. Fan f4ed4c17b4
TST Fixes logistic & partial_dependence test for 32bit wheels (#19402) 2021-02-12 09:53:35 +01:00
Yosuke KOBAYASHI 81a56bd8bf
FIX Don't overwrite input sample_weight in LogisticRegression (#19182) 2021-02-01 21:15:36 +01:00
Thomas J. Fan 8aa6f076a2
MNT Catches scipy 1.3.0 for using deprecated tostring method (#18755) 2020-11-06 18:58:38 +01:00
Christian Lorentzen fcba0d6c0b
TST Add test for multinomial identifiability constraint in logistic regression (#16791)
* MNT import from numpy.testing in logistic regression

* TST add test for symmetric identifiability constraint

* address review comments

* address review comments again

* reduce atol
2020-07-15 22:24:30 -04:00
Rithvik Rao 005d55e3d8
TST Fixed tiny typo in test_logistic.py (#17562) 2020-06-11 09:13:23 +02:00
Thomas J Fan e770715c43
MNT Completes position arg deprecation (#17272)
* ENH Adds public functions with position args warning

* BUG Circlar import

* STY

* BUG Add keywords

* BUG Fixes warnings

* ENH Adds other public functions

* CLN Suggestion

* CLN Suggestion

* REV Revert pairwise

* ENH Positoinal args for compute_class_weight
2020-05-19 09:07:25 +02:00
Roman Feldbauer 9b39c4c4d2
TST Fix unreachable code in tests (#16110) 2020-02-16 14:41:26 +01:00
Nicolas Hug 5573abbb99 MNT Removed deprecated logistic_regression_path (#15791) 2019-12-04 12:24:10 -05:00
Olivier Grisel 43d8dee07b MNT improve the convergence warning message for LogisticRegression (#15665) 2019-11-20 09:48:26 +11:00
Thomas J Fan d84785c5e1 [MRG] ENH: Add scaling to convergence warning for LBFGS (#15571) 2019-11-17 17:10:14 +11:00
Nicolas Hug 19ad136223 MNT Replace DeprecationWarning with FutureWarning (#15080)
* bruteforce renaming

* WIP

* WIP

* some more

* removed weird line

* update -Werror

* testiforest

* again

* Fixed some tests

* fixed some tests

* removed -Werror

* fixed test_docstring_param issue

* fixed some tests

* some more

* renamed to SklearnDeprecationWarning

* pep8

* updated docs

* pep8

* merge

* changed to FutureWarning

* fixes

* Update doc/developers/tips.rst

Co-Authored-By: Adrin Jalali <adrin.jalali@gmail.com>

* avoid duplicates

* fixed warning for deprecations

* Still make CI break if DeprecationWarning isn't caught

* updated one warning

* fixed test

* fixed some renamings

* updated new dep warnings

* fixed bad import

* ignore warnings

* update again

* ignore futurewarning when walking packages

* Fixed test

* pep8

* Added whatsnew
2019-10-29 15:39:26 +01:00
Nicolas Hug b92455a6b2 MAINT Deprecate all of utils.testing except all_estimators (#15367) 2019-10-28 17:28:56 +01:00
Guillaume Lemaitre 2b60d32977 MAINT sync/add support sample_weight with liblinear (#15038) 2019-10-25 08:38:19 -04:00
Nicolas Hug 7effc37174
MNT Warn when shuffle is False but random_state is not None (#15353) 2019-10-24 16:33:12 -04:00
Nicolas Hug bcd399f4cb FIX Fixed some imports after deprecations (#15345) 2019-10-23 16:59:52 +02:00
Thomas J Fan 0a7adef005 MNT Make modules private in linear_model (#15324) 2019-10-23 15:34:26 +02:00
Thomas J Fan e489aab0d6 MNT Remove warning in logistic regression cv scoring (#15184) 2019-10-18 18:55:25 +02:00
Nicolas Hug 220e146a7f FIX Fixed reshaping attributes of LogisticRegressionCV (#15044) 2019-10-03 09:59:14 +02:00
qdeffense f13c9c0752 CLN remove redundant default parameters in examples and tests (#14590)
remove redundant 'fit_intercept=True' in examples and tests along with some instances of other redundant parameters (max_iter=100, C=1 and alpha=1.0)
2019-08-07 10:38:41 -07:00
Alex Henrie 583e18fc46 PERF Support converting 32-bit matrices directly to liblinear format (#14296) 2019-07-31 13:13:28 +02:00
Adrin Jalali 19c068a2ec MNT towards removing assert_equal, etc (#14222) 2019-07-01 09:13:32 -04:00
Roman Yurchak 842df6f60e MAINT Faster linear_model tests (#14105) 2019-06-19 18:56:53 -07:00
Nicolas Hug 36b688eb04 [MRG] fix refit=False error in LogisticRegressionCV (#14087) 2019-06-14 17:38:41 +02:00
Oleksandr Pavlyk 9d7b804603 MAINT: adjustments to test_logistic.py::test_dtype_match (#13645) 2019-06-11 15:46:13 +02:00
Roman Yurchak ccd3331f7e MNT remove unused imports (#14021) 2019-06-04 23:15:19 +10:00
Guillaume Lemaitre 9adba491a2 [MRG] DEP change the default of cv and n_splits (#13839) 2019-05-29 23:39:20 +10:00
Guillaume Lemaitre c28ef9ef2a DEP change the default of multi_class to 'auto' in logistic regression (#13807) 2019-05-22 09:57:15 -04:00
Guillaume Lemaitre 69eb4d4678 [MRG] DEP change default and deprecate iid in SearchCV (#13834) 2019-05-09 14:26:05 +02:00
Guillaume Lemaitre 7896b21562 MNT change default of solver in LogisiticRegression (#13805) 2019-05-08 21:31:39 +08:00
Clément Doumouro 01bc8b18ac FIX non deterministic behavior in SGD (#13422) 2019-04-04 21:31:09 +11:00
Andreas Mueller d879b5cdbe MNT be more friendly in the deprecation warning of cv=3 (#13395)
* be more friendly in the deprecation of cv=3

* add hint on specifying cv

* catch all the right warnings
2019-03-05 19:28:34 +01:00
Joan Massich f02ef9f52f LogisticRegression convert to float64 (for SAG solver) (#13243)
* Remove unused code

* Squash all the PR 9040 commits

initial PR commit

seq_dataset.pyx generated from template

seq_dataset.pyx generated from template #2

rename variables

fused types consistency test for seq_dataset

a

sklearn/utils/tests/test_seq_dataset.py

new if statement

add doc

sklearn/utils/seq_dataset.pyx.tp

minor changes

minor changes

typo fix

check numeric accuracy only up 5th decimal

Address oliver's request for changing test name

add test for make_dataset and rename a variable in test_seq_dataset

* FIX tests

* TST more numerically stable test_sgd.test_tol_parameter

* Added benchmarks to compare SAGA 32b and 64b

* Fixing gael's comments

* fix

* solve some issues

* PEP8

* Address lesteve comments

* fix merging

* avoid using assert_equal

* use all_close

* use explicit ArrayDataset64 and CSRDataset64

* fix: remove unused import

* Use parametrized to cover ArrayDaset-CSRDataset-32-64 matrix

* for consistency use 32 first then 64 + add 64 suffix to variables

* it would be cool if this worked !!!

* more verbose version

* revert SGD changes as much as possible.

* Add solvers back to bench_saga

* make 64 explicit in the naming

* remove checking native python type + add comparison between 32 64

* Add whatsnew with everyone with commits

* simplify a bit the testing

* simplify the parametrize

* update whatsnew

* fix pep8
2019-02-27 11:14:29 +01:00
Roman Yurchak 0e3bb17e62 MAINT Run pyupgrade following Python2 deprecation (#12997) 2019-02-08 20:13:34 +08:00
Nicolas Hug 0a07364abd ENH Added penalty='none' to LogisticRegression (#12860) 2019-01-10 09:26:30 +11: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