scikit-learn/examples/linear_model
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
..
README.txt move around examples for better structure. 2014-07-17 09:35:30 +02:00
plot_ard.py [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
plot_bayesian_ridge.py [MRG] np.ones -> np.full (#11628) 2018-07-23 09:49:01 +02:00
plot_huber_vs_ridge.py Huber regressor 2016-02-25 16:31:08 -05:00
plot_iris_logistic.py EXA Fix comment in plot-iris-logistic example (#12564) 2018-11-12 09:33:42 +08:00
plot_lasso_and_elasticnet.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00
plot_lasso_coordinate_descent_path.py [MRG+1] Fix warnings in lgtm.com (remove redundant code) (#9719) 2017-09-14 11:42:58 +02:00
plot_lasso_dense_vs_sparse_data.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00
plot_lasso_lars.py Remove unused variable alphas from the LARS example. (#9882) 2017-10-07 17:04:08 +02:00
plot_lasso_model_selection.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00
plot_logistic.py [MRG] Fix FutureWarnings in logistic regression examples (#12114) 2018-09-24 18:22:40 +01:00
plot_logistic_l1_l2_sparsity.py [MRG] Add elastic net penalty to LogisticRegression (#11646) 2018-11-21 20:23:57 -05:00
plot_logistic_multinomial.py [MRG + 1] 18 more examples with matplotlib 2.0 updates (#8983) 2017-06-07 13:23:12 +02:00
plot_logistic_path.py [MRG] Fix FutureWarnings in logistic regression examples (#12114) 2018-09-24 18:22:40 +01:00
plot_multi_task_lasso_support.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00
plot_ols.py Save predictions in diabetes_y_pred (#8241) 2017-02-27 23:06:26 +01:00
plot_ols_3d.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00
plot_ols_ridge_variance.py EXA Fix title, overlapping plots and axis labels in plot_ols_ridge_variance.py (#12296) 2018-10-09 21:44:57 +08:00
plot_omp.py [MRG+1] EXA Set cv=5 in examples (#11856) 2018-08-20 15:22:42 -04:00
plot_polynomial_interpolation.py Added colorblind compatibility 2015-10-22 18:59:24 +02:00
plot_ransac.py [MRG] make the ransac example slightly more terse, improve range of plot (#8258) 2017-02-01 08:31:07 +01:00
plot_ridge_coeffs.py Ridge coefficients as a function of regularisation 2016-01-19 16:04:36 +01:00
plot_ridge_path.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00
plot_robust_fit.py Huber regressor 2016-02-25 16:31:08 -05:00
plot_sgd_comparison.py [MRG+1] Setting max_iter/tol explicitly for SGD estimators in docs (#9776) 2017-10-04 17:28:32 +02:00
plot_sgd_early_stopping.py Deprecate fetch_mldata (#11466) 2018-08-18 19:27:48 +03:00
plot_sgd_iris.py Deprecate n_iter in SGDClassifier and implement max_iter (#5036) 2017-06-23 21:49:29 +02:00
plot_sgd_loss_functions.py [MRG] loss function plot y-label slightly confusing (#8283) 2017-02-06 21:10:44 +11:00
plot_sgd_penalties.py [MRG+1] DOC changed plotting of SGD penalties to improve clarity (#10574) 2018-02-07 23:54:36 +11:00
plot_sgd_separating_hyperplane.py Deprecate n_iter in SGDClassifier and implement max_iter (#5036) 2017-06-23 21:49:29 +02:00
plot_sgd_weighted_samples.py Deprecate n_iter in SGDClassifier and implement max_iter (#5036) 2017-06-23 21:49:29 +02:00
plot_sparse_logistic_regression_20newsgroups.py Add SAGA solver for LogisticRegression and Ridge (#8446) 2017-03-27 21:39:30 +02:00
plot_sparse_logistic_regression_mnist.py EXA Use fetch_openml(returnX_y=True) (#11855) 2018-08-20 09:02:52 +10:00
plot_theilsen.py [MRG] DOC examples with correct notebook style (#9061) 2017-06-20 14:48:57 +02:00

README.txt

.. _linear_examples:

Generalized Linear Models
-------------------------

Examples concerning the :mod:`sklearn.linear_model` module.