Commit Graph

1936 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
Rohan Lekhwani e0697b01a7 MNT Used scipy.special.expit for the inverse of the logit function (#12931) 2019-01-08 18:35:19 +11:00
Roman Yurchak acb8106472 MNT Use list and dict comprehension (#12668) 2019-01-08 09:32:34 +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 a50c03f975 [MRG] Add pprint for estimators - continued (#11705)
* add pprint for estimators

* strip color from length, add color option

* Minor cleaning, fixes, factoring and docs

* Added some basic tests

* Fixed line length issue

* fixed flake8 and added visual test for review

* Fixed test

* Fixed Python 2 issues (inspect.signature import)

* Trying to fix flake8 again

* Added special repr for functions

* Added some other visual tests

* Changed _format_function in to _format_callable

because callable() returns True also for class objects (which we want to
reprensent with their name as well anyway)

* Consistent output in Python 2 and 3

* WIP

* Now using the builtin pprint module

* pep8

* Added changed_only param

* Fixed printing when string would fit in less than line width

* Fixed printing of steps parameter

* Fixed changed_only param for short estimators

* fixed pep8

* Added some more description in docstring

* changed_only is now an option from set_config()

* Put _pprint.py into sklearn/utils, added tests

* Added doctest NORMALIZE_WHITESPACE where needed

* Fixed tests

* fix test-doc

* fixing test that passed before....

* Fixed tests

* Added test for changed_only and long lines

* typo

* Added authors names

* Added license file

* Added ellipsis based on number of elements in sequence + added increasinly aggressive repr strategies

* Updated whatsnew

* dont use increaingly aggressive strategy

* Fixed tests

* Removed LICENSE file and put license text in _pprint.py

* fixed test_base

* Sorted parameters dictionary for consistent output in 3.5

* Actually using OrderedDict...

* Addressed comments

* Added test for NaN changed parameter

* Update whatsnew

* Added example to set_config()

* Removed example

* Added example in gallery

* Spelling
2018-12-19 23:48:21 -05: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
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
Quentin Batista 4b78d7abf4 DOC: Clarify `cv` parameter description in `GridSearchCV` (#12495)
#### 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
-->

This PR addresses issue #12466.

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

This PR does the 3 following things:
- Rewrite the `cv` parameter description in `GridSearchCV`
- Link the new `CV splitter` description to an existing example
- Add an example with a custom iterable

Thanks for reviewing this!

Close #12466
2018-11-12 15:10:15 -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
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
Olivier Grisel e67e30cec2 Fix numpy vstack on generator expressions (#12467)
* Workaround vstack issue with genxp

* Use list comprehensions instead of genexps with np.vstack

* Add changelog entry.
2018-10-29 11:40:05 -04: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
Matthew Roeschke 5af272ac61 MNT Remove unused variables (#12230) 2018-10-22 12:48:40 +11: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
Adrin Jalali 00c2f411cf DOC fix logistic regression.fit docstring on y (#12343) 2018-10-10 22:57:11 +11:00
TakingItCasual f4e7d2b19a Converting http to https (3)... (#12302) 2018-10-05 18:50:31 +02:00
Denis Kataev b020f62250 MNT Apply pep8 to docs code (#12275) 2018-10-05 22:51:42 +08: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
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
Andreas Mueller aa53493e86 fix typo 2018-09-14 13:29:35 -04:00
Adrin Jalali 2ed18e00f7 [MRG] DOC Examples added to the rest of linear models (#11975) 2018-09-12 17:47:42 +10:00
jakirkham dff84c8194 MNT Use `fmax` when finding the maximum (#12005)
Instead of adding an `if` to check for values that become the new max,
simply use `fmax` to get the maximum and update the value. This improves
readability. It may improve performance as `fmax` can be a single
assembly instruction. Though most compilers can probably figure this out
anyways.
2018-09-05 17:11:00 +08:00
Joel Nothman b24ef3631a FIX xfail for MacOS LogisticRegressionCV stability (#11936) 2018-08-29 10:41:52 +03:00
jakirkham 8d7ce8e7b3 MNT: Use GEMV in enet_coordinate_descent (Pt. 1) (#11896) 2018-08-27 15:01:18 +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
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
Anubhav Marwaha b8785139e2 DOC Perceptron examples in Perceptron.py (#11798) 2018-08-15 17:32:42 +08:00
Roman Yurchak c3915c0995 MAINT Fix effective_n_jobs in LogisticRegression (#11803) 2018-08-14 10:55:44 +08:00
jakirkham 78493769f0 MNT: Use memoryviews instead of ndarrays (#11722) 2018-08-11 21:47:22 +10:00
Oren Milman 38e7c8b117 fix the docstring (#11788) 2018-08-10 11:26:47 -07:00
Oren Milman 6e97763298 fix the docstring (#11789) 2018-08-10 11:25:40 -07:00
Nicolas Hug aa7a6fc890 DOC Minor doc fixes to coordinate_descent.py (#11737) 2018-08-07 22:09:42 +08:00
Adrin Jalali fc521a04fd DOC added LogisticRegression(CV) examples (#11735) 2018-08-06 21:21:20 +08:00
Kuai Yu 7ba7a4a1c2 Style improvements to least_angle.py (#11703) 2018-08-06 11:10:42 +02: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