@@ -962,8 +962,23 @@ class Ridge(MultiOutputMixin, RegressorMixin, _BaseRidge):
962
962
For 'lbfgs' solver, the default value is 15000.
963
963
964
964
tol : float, default=1e-4
965
- Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
966
- 'cholesky'.
965
+ The precision of the solution (`coef_`) is determined by `tol` which
966
+ specifies a different convergence criterion for each solver:
967
+
968
+ - 'svd': `tol` has no impact.
969
+
970
+ - 'cholesky': `tol` has no impact.
971
+
972
+ - 'sparse_cg': norm of residuals smaller than `tol`.
973
+
974
+ - 'lsqr': `tol` is set as atol and btol of scipy.sparse.linalg.lsqr,
975
+ which control the norm of the residual vector in terms of the norms of
976
+ matrix and coefficients.
977
+
978
+ - 'sag' and 'saga': relative change of coef smaller than `tol`.
979
+
980
+ - 'lbfgs': maximum of the absolute (projected) gradient=max|residuals|
981
+ smaller than `tol`.
967
982
968
983
.. versionchanged:: 1.2
969
984
Default value changed from 1e-3 to 1e-4 for consistency with other linear
@@ -1252,8 +1267,23 @@ class RidgeClassifier(_RidgeClassifierMixin, _BaseRidge):
1252
1267
The default value is determined by scipy.sparse.linalg.
1253
1268
1254
1269
tol : float, default=1e-4
1255
- Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
1256
- 'cholesky'.
1270
+ The precision of the solution (`coef_`) is determined by `tol` which
1271
+ specifies a different convergence criterion for each solver:
1272
+
1273
+ - 'svd': `tol` has no impact.
1274
+
1275
+ - 'cholesky': `tol` has no impact.
1276
+
1277
+ - 'sparse_cg': norm of residuals smaller than `tol`.
1278
+
1279
+ - 'lsqr': `tol` is set as atol and btol of scipy.sparse.linalg.lsqr,
1280
+ which control the norm of the residual vector in terms of the norms of
1281
+ matrix and coefficients.
1282
+
1283
+ - 'sag' and 'saga': relative change of coef smaller than `tol`.
1284
+
1285
+ - 'lbfgs': maximum of the absolute (projected) gradient=max|residuals|
1286
+ smaller than `tol`.
1257
1287
1258
1288
.. versionchanged:: 1.2
1259
1289
Default value changed from 1e-3 to 1e-4 for consistency with other linear
0 commit comments