scikit-learn/examples/linear_model
Christian Lorentzen ff9344f3d8
FEA add (single) Cholesky Newton solver to GLMs (#24637)
* FEA add NewtonSolver, CholeskyNewtonSolver and QRCholeskyNewtonSolver

* ENH better singular hessian special solve

* CLN fix some typos found by reviewer

* TST assert ConvergenceWarning is raised

* MNT add BaseCholeskyNewtonSolver

* WIP colinear design in GLMs

* FIX _solve_singular

* FIX false unpacking in

* TST add tests for unpenalized GLMs

* TST fix solutions of glm_dataset

* ENH add SVDFallbackSolver

* CLN remove SVDFallbackSolver

* ENH use gradient step for singular hessians

* ENH print iteration number in warnings

* TST improve test_linalg_warning_with_newton_solver

* CLN LinAlgWarning fron scipy.linalg

* ENH more robust hessian

* ENH increase maxls for lbfgs to make it more robust

* ENH add hessian_warning for too many negative hessian values

* CLN some warning messages

* ENH add lbfgs_step

* ENH use lbfgs_step for hessian_warning

* TST make them pass

* TST tweek rtol for lbfgs

* TST add rigoros test for GLMs

* TST improve test_warm_start

* ENH improve lbfgs options for better convergence

* CLN fix test_warm_start

* TST fix assert singular values in datasets

* CLN address most review comments

* ENH enable more vebosity levels for lbfgs

* DOC add whatsnew

* CLN remove xfail and clean a bit

* CLN docstring about minimum norm

* More informative repr for the glm_dataset fixture cases

* Forgot to run black

* CLN remove unnecessary filterwarnings

* CLN address review comments

* Trigger [all random seeds] on the following tests:
test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* CLN add comment for lbfgs ftol=64 * machine precision

* CLN XXX code comment

* Trigger [all random seeds] on the following tests:

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* CLN link issue and remove code snippet in comment

* Trigger [all random seeds] on the following tests:

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* CLN add catch_warnings

* Trigger [all random seeds] on the following tests:

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* Trigger [all random seeds] on the following tests:

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* [all random seeds]

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* Trigger with -Werror [all random seeds]

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* ENH increase maxls to 50

* [all random seeds]

test_glm_regression
test_glm_regression_hstacked_X
test_glm_regression_vstacked_X
test_glm_regression_unpenalized
test_glm_regression_unpenalized_hstacked_X
test_glm_regression_unpenalized_vstacked_X
test_warm_start

* Revert "Trigger with -Werror [all random seeds]"

This reverts commit 99f4cf99ca.

* TST add catch_warnings to filterwarnings

* TST adapt tests for newton solvers

* CLN cleaner gradient step with gradient_times_newton

* DOC add whatsnew

* ENH always use lbfgs as fallback

* TST adapt rtol

* TST fix test_linalg_warning_with_newton_solver

* CLN address some review comments

* Improve tests related to convergence warning on collinear data

* overfit -> fit

* Typo in comment

* Apply suggestions from code review

* ENH fallback_lbfgs_solve
- Do not use lbfgs steps, fall back complete to lbfgs

* ENH adapt rtol

* Improve test_linalg_warning_with_newton_solver

* Better comments

* Fixed Hessian casing and improved warning messages

* [all random seeds]

test_linalg_warning_with_newton_solver

* Ignore ConvergenceWarnings for now if convergence is good

* CLN remove counting of warnings

* ENH fall back to lbfgs if line search did not converge

* DOC better comment on performance bottleneck

* Update GLM related examples to use the new solver

* CLN address reviewer comments

* EXA improve some wordings

* CLN do not pop "solver in parameter constraints

* CLN fix typos

* DOC fix docstring

* CLN remove solver newton-qr-cholesky

* DOC update PR number in whatsnew

* CLN address review comments

* CLN remove unnecessary catch_warnings

* CLN address some review comments

* DOC more precise whatsnew

* CLN use init_zero_coef

* CLN use and test init_zero_coef

* CLN address some review comments

* CLN mark NewtonSolver as private by leading underscore

* CLN exact comments for inner_solve

* TST add test_newton_solver_verbosity

* TST extend test_newton_solver_verbosity

* TST logic in test_glm_regression_unpenalized

* TST use count_nonzero

* CLN remove super rare line search checks

* MNT move Newton solver to new file _newton_solver.py

Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Co-authored-by: Julien Jerphanion <git@jjerphan.xyz>
2022-10-24 22:16:45 +02:00
..
README.txt move around examples for better structure. 2014-07-17 09:35:30 +02:00
plot_ard.py DOC Rework plot_ard.py example (#22747) 2022-04-21 12:17:53 +02:00
plot_bayesian_ridge_curvefit.py DOC Update notebook style for plot_bayesian_ridge_curvefit (#22916) 2022-03-30 15:43:33 +02:00
plot_elastic_net_precomputed_gram_matrix_with_weighted_samples.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_huber_vs_ridge.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_iris_logistic.py FEA Add DecisionBoundaryDisplay (#16061) 2022-03-29 16:36:31 +02:00
plot_lasso_and_elasticnet.py DOC use notebook-style for plot_lasso_and_elasticnet (#22423) 2022-02-10 08:13:01 +01:00
plot_lasso_coordinate_descent_path.py MNT Update to black 22.3.0 to resolve click error (#22983) 2022-03-29 12:04:41 +02:00
plot_lasso_dense_vs_sparse_data.py DOC Use notebook style for plot_lasso_dense_vs_sparse_data (#22789) 2022-03-13 10:34:27 +01:00
plot_lasso_lars.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_lasso_lars_ic.py MAINT Clean deprecation for 1.2: normalize in linear models (#24391) 2022-10-12 14:06:47 +02:00
plot_lasso_model_selection.py MAINT Clean deprecation for 1.2: normalize in linear models (#24391) 2022-10-12 14:06:47 +02:00
plot_logistic.py DOC fix labels in legend of plot_logistic example (#24455) 2022-09-16 16:57:33 +02:00
plot_logistic_l1_l2_sparsity.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_logistic_multinomial.py FEA Add DecisionBoundaryDisplay (#16061) 2022-03-29 16:36:31 +02:00
plot_logistic_path.py DOC: use notebook-style for plot_logistic_path.py (#22536) 2022-02-22 11:55:00 +01:00
plot_multi_task_lasso_support.py DOC Use notebook style for remaining notebooks (#23365) 2022-05-13 18:07:24 +02:00
plot_nnls.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_ols.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_ols_3d.py DOC: use notebook-style for plot_ols_3d (#22547) 2022-02-23 10:18:29 +01:00
plot_ols_ridge_variance.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_omp.py MAINT Clean deprecation for 1.2: normalize in linear models (#24391) 2022-10-12 14:06:47 +02:00
plot_poisson_regression_non_normal_loss.py FEA add (single) Cholesky Newton solver to GLMs (#24637) 2022-10-24 22:16:45 +02:00
plot_polynomial_interpolation.py DOC: Minor updates to polynomial interpolation example (#21492) 2021-10-29 08:49:49 -04:00
plot_quantile_regression.py DOC Fix some typos (#24300) 2022-08-29 12:17:46 -04:00
plot_ransac.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_ridge_coeffs.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_ridge_path.py DOC use notebook-style in linear_model/plot_ridge_path.py (#23209) 2022-04-26 22:44:41 +02:00
plot_robust_fit.py MAINT Enable and run black on examples (#20502) 2021-10-07 10:13:00 +02:00
plot_sgd_comparison.py DOC Increase execution speed of plot_sgd_comparison (#21610) 2021-12-09 12:40:55 -05:00
plot_sgd_early_stopping.py ENH improve ARFF parser using pandas (#21938) 2022-05-12 18:21:15 +02:00
plot_sgd_iris.py FEA Add DecisionBoundaryDisplay (#16061) 2022-03-29 16:36:31 +02:00
plot_sgd_loss_functions.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_sgd_penalties.py MNT Update black to stable version (#22474) 2022-02-15 11:36:26 +01:00
plot_sgd_separating_hyperplane.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_sgd_weighted_samples.py DOC Fixes plot_sgd example to be consistent with 0.24 (#22424) 2022-02-09 18:12:13 +01:00
plot_sgdocsvm_vs_ocsvm.py MAINT consistent use of `print(__doc__)` in examples (#21307) 2021-10-22 15:33:22 +02:00
plot_sparse_logistic_regression_20newsgroups.py updated epoch and training size (#21773) 2021-11-26 15:23:11 +01:00
plot_sparse_logistic_regression_mnist.py ENH improve ARFF parser using pandas (#21938) 2022-05-12 18:21:15 +02:00
plot_theilsen.py DOC use notebook-style for plot_theilsen (#23002) 2022-04-06 08:34:12 +02:00
plot_tweedie_regression_insurance_claims.py FEA add (single) Cholesky Newton solver to GLMs (#24637) 2022-10-24 22:16:45 +02:00

README.txt

.. _linear_examples:

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

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