Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC impact of tol for solvers in RidgeClassifier #25530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions 38 sklearn/linear_model/_ridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,23 @@ class Ridge(MultiOutputMixin, RegressorMixin, _BaseRidge):
For 'lbfgs' solver, the default value is 15000.

tol : float, default=1e-4
Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
'cholesky'.
The precision of the solution (`coef_`) is determined by `tol` which
specifies a different convergence criterion for each solver:

- 'svd': `tol` has no impact.

- 'cholesky': `tol` has no impact.

- 'sparse_cg': norm of residuals smaller than `tol`.

- 'lsqr': `tol` is set as atol and btol of scipy.sparse.linalg.lsqr,
which control the norm of the residual vector in terms of the norms of
matrix and coefficients.

- 'sag' and 'saga': relative change of coef smaller than `tol`.

- 'lbfgs': maximum of the absolute (projected) gradient=max|residuals|
smaller than `tol`.

.. versionchanged:: 1.2
Default value changed from 1e-3 to 1e-4 for consistency with other linear
Expand Down Expand Up @@ -1252,8 +1267,23 @@ class RidgeClassifier(_RidgeClassifierMixin, _BaseRidge):
The default value is determined by scipy.sparse.linalg.

tol : float, default=1e-4
Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
'cholesky'.
The precision of the solution (`coef_`) is determined by `tol` which
specifies a different convergence criterion for each solver:

- 'svd': `tol` has no impact.

- 'cholesky': `tol` has no impact.

- 'sparse_cg': norm of residuals smaller than `tol`.

- 'lsqr': `tol` is set as atol and btol of scipy.sparse.linalg.lsqr,
which control the norm of the residual vector in terms of the norms of
matrix and coefficients.

- 'sag' and 'saga': relative change of coef smaller than `tol`.

- 'lbfgs': maximum of the absolute (projected) gradient=max|residuals|
smaller than `tol`.

.. versionchanged:: 1.2
Default value changed from 1e-3 to 1e-4 for consistency with other linear
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.