Commit Graph

155 Commits

Author SHA1 Message Date
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
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
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
Yaroslav Halchenko 6226cf59ad TST skip test_backend_respected if joblib is forced into serial mode (#12496) 2018-11-02 23:10:57 +01: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
Nicolas Hug e500447596 [MRG] Fixed bug in _log_reg_scoring_path for multinomial case (#11724) 2018-08-02 15:50:34 +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
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
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
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
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