Commit Graph

39 Commits

Author SHA1 Message Date
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
Thomas J. Fan 5f75acdd12
MNT Bump joblib version dependency to 1.0.0 (#22365) 2022-02-09 13:47:18 +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
genvalen 642127806a
DOC use backticks for n_samples and n_features in X docstring (#20914) 2021-09-02 13:35:03 +02:00
Thomas J. Fan 786c4e5e39
DOC Adds feature_names_in_ to docstrings (#20787) 2021-08-26 13:44:45 +02:00
Thomas J. Fan 3ae7c76153
STY Enables black with experimental_string_processing=true (#20412) 2021-06-29 09:47:04 +02:00
Luccas Quadros 209b096721
DOC Ensures that LogisticRegressionCV passes numpydoc validation (#20376)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-06-28 10:03:06 +02:00
Thomas J. Fan 351ace7935
STY Uses black's with target_version >= 3.7 (#20294) 2021-06-17 15:50:27 -04:00
Thomas J. Fan 82df48934e
MNT Applies black formatting to most of the code base (#18948) 2021-06-17 14:21:09 -04:00
Thomas J. Fan 9a13bdfaf1
MNT Adds black config and fixes formatting before black (#19031)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
Co-authored-by: Christian Lorentzen <lorentzen.ch@gmail.com>
2021-06-12 17:14:09 +02:00
Guillaume Lemaitre 1cd282d600
DOC add n_features_in_ in the documentation (#20236) 2021-06-09 16:58:03 +02:00
michalkrawczyk bc91f01e54
DOC improve penalty/solver/muticlass support in LogisticRegression* (#19855)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2021-05-28 12:25:55 +02:00
Tom Dupré la Tour f6e6ad2d9e
MNT clean futurewarning for 1.0 | _deprecate_positional_args (#20002)
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
2021-05-14 11:30:27 -04:00
Julien Jerphanion 0c74b8b7d5
ENH Optimize dot product order for LogisticRegression for dense matrices (#19571)
* Use multi_dot for Hessian and gradient product. 
  np.linalg.multi_dot quickly chooses the best order for the multiplication of three matrices.
2021-03-14 15:43:51 +01:00
Yosuke KOBAYASHI 81a56bd8bf
FIX Don't overwrite input sample_weight in LogisticRegression (#19182) 2021-02-01 21:15:36 +01:00
Alex Henrie f35457f1fc
MNT Remove unnecessary assignments from LogisticRegression.fit (#18539) 2020-10-05 22:43:38 +02:00
Thomas J. Fan 06d6f8a9f6
FIX Passes global configuration when spawning joblib jobs (#17634)
* WIP

* BUG Passes context to joblib jobs

* BUG Fix

* BUG Fix

* CLN Moves delayed into fixes

* CLN Adds linter

* REV Revert diff

* DOC Adds comment for removal

* Use a simple implementation
2020-09-21 16:59:42 +02:00
Albert Villanova del Moral 647fcb1ac1
DOC Fix A to uppercase in See Also docstring section (#18332) 2020-09-04 10:35:01 -04:00
Nicolas Hug 1dedc7e6a8
[MRG] Prototype 4 for strict check_estimator mode (#17361) 2020-08-06 12:02:15 +02:00
Juan Carlos Alfaro Jiménez 9cd13a1fa1
FIX Change MRO for some estimators (#17837) 2020-07-05 13:52:42 +02:00
Roman Yurchak 8feb04524c
Common check for sample weight invariance with removed samples (#17176)
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
2020-06-04 00:30:01 +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 Yurchak 818e16a1ea Revert "Common check for sample weight invariance with removed samples (#16507)"
This reverts commit 77279d6b3e.
2020-05-10 17:05:01 +02:00
Roman Yurchak 77279d6b3e
Common check for sample weight invariance with removed samples (#16507)
Co-Authored-By: Nicolas Hug <contact@nicolas-hug.com>
2020-05-10 15:41:53 +02:00
Adrin Jalali dc0cc6e9be
[MRG] API kwonly args in impute, inspection, kernel_ridge (#16926)
, and linear_model
2020-04-19 22:58:47 +02:00
Christian Lorentzen a2ccc330bf
STY PEP8 fix E731 in linear_model/_logistic.py (#16786) 2020-03-30 17:49:40 +02:00
Roman Yurchak 75d3f29e72
MAINT Remove outdated numpy and scipy backports (#16725)
* Remove unecessary numpy & scipy backports

* More fixes

* Remove unused imports
2020-03-20 13:57:18 +01:00
Alex Henrie 438bb3a438
MNT Remove unused imports (#16665) 2020-03-11 10:01:51 +11:00
Nicolas Hug d205638475
MNT Introduction of n_features_in_ attr with _validate_data mtd (#16112) 2020-02-29 09:05:11 -05:00
Johann Faouzi dd93e01061 DOC Add missing backquote in LogisticRegression docstring (#16106) 2020-01-13 11:18:03 +01:00
Marie Douriez 3f9f7d5f7d DOC improve random_state docstring in _logistic.py (#15729) 2020-01-08 15:47:22 +01:00
@nkish 8fc16206e8 DOC Improve default values in logistic documentation (#15966)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
2019-12-26 12:46:03 +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
Tola A 9c2c263f9b DOC numpydoc validations for LogisticRegression (#15445) 2019-11-02 15:38:50 +01:00
Roman Yurchak 1ede443b7a MNT Docstring validation with numpydoc (#15404) 2019-11-02 09:59:56 +01:00
Thomas J Fan 0a7adef005 MNT Make modules private in linear_model (#15324) 2019-10-23 15:34:26 +02:00