<!--
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!
-->
* 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)
* Created 'cross-validation estimator' in glossary and referenced it where
needed
* Addressed adrinjalali comments
* updated glossary entry
* updaed docstrings according to commets
* 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
* 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
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`.
* 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
* 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