@@ -66,7 +66,7 @@ def _solve_sparse_cg(
66
66
y ,
67
67
alpha ,
68
68
max_iter = None ,
69
- tol = 1e-3 ,
69
+ tol = 1e-4 ,
70
70
verbose = 0 ,
71
71
X_offset = None ,
72
72
X_scale = None ,
@@ -153,7 +153,7 @@ def _solve_lsqr(
153
153
alpha ,
154
154
fit_intercept = True ,
155
155
max_iter = None ,
156
- tol = 1e-3 ,
156
+ tol = 1e-4 ,
157
157
X_offset = None ,
158
158
X_scale = None ,
159
159
sample_weight_sqrt = None ,
@@ -303,7 +303,7 @@ def _solve_lbfgs(
303
303
alpha ,
304
304
positive = True ,
305
305
max_iter = None ,
306
- tol = 1e-3 ,
306
+ tol = 1e-4 ,
307
307
X_offset = None ,
308
308
X_scale = None ,
309
309
sample_weight_sqrt = None ,
@@ -381,7 +381,7 @@ def ridge_regression(
381
381
sample_weight = None ,
382
382
solver = "auto" ,
383
383
max_iter = None ,
384
- tol = 1e-3 ,
384
+ tol = 1e-4 ,
385
385
verbose = 0 ,
386
386
positive = False ,
387
387
random_state = None ,
@@ -471,8 +471,13 @@ def ridge_regression(
471
471
by scipy.sparse.linalg. For 'sag' and saga solver, the default value is
472
472
1000. For 'lbfgs' solver, the default value is 15000.
473
473
474
- tol : float, default=1e-3
475
- Precision of the solution.
474
+ tol : float, default=1e-4
475
+ Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
476
+ 'cholesky'.
477
+
478
+ .. versionchanged:: 1.2
479
+ Default value changed from 1e-3 to 1e-4 for consistency with other linear
480
+ models.
476
481
477
482
verbose : int, default=0
478
483
Verbosity level. Setting verbose > 0 will display additional
@@ -556,7 +561,7 @@ def _ridge_regression(
556
561
sample_weight = None ,
557
562
solver = "auto" ,
558
563
max_iter = None ,
559
- tol = 1e-3 ,
564
+ tol = 1e-4 ,
560
565
verbose = 0 ,
561
566
positive = False ,
562
567
random_state = None ,
@@ -803,7 +808,7 @@ def __init__(
803
808
normalize = "deprecated" ,
804
809
copy_X = True ,
805
810
max_iter = None ,
806
- tol = 1e-3 ,
811
+ tol = 1e-4 ,
807
812
solver = "auto" ,
808
813
positive = False ,
809
814
random_state = None ,
@@ -977,8 +982,13 @@ class Ridge(MultiOutputMixin, RegressorMixin, _BaseRidge):
977
982
by scipy.sparse.linalg. For 'sag' solver, the default value is 1000.
978
983
For 'lbfgs' solver, the default value is 15000.
979
984
980
- tol : float, default=1e-3
981
- Precision of the solution.
985
+ tol : float, default=1e-4
986
+ Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
987
+ 'cholesky'.
988
+
989
+ .. versionchanged:: 1.2
990
+ Default value changed from 1e-3 to 1e-4 for consistency with other linear
991
+ models.
982
992
983
993
solver : {'auto', 'svd', 'cholesky', 'lsqr', 'sparse_cg', \
984
994
'sag', 'saga', 'lbfgs'}, default='auto'
@@ -1096,7 +1106,7 @@ def __init__(
1096
1106
normalize = "deprecated" ,
1097
1107
copy_X = True ,
1098
1108
max_iter = None ,
1099
- tol = 1e-3 ,
1109
+ tol = 1e-4 ,
1100
1110
solver = "auto" ,
1101
1111
positive = False ,
1102
1112
random_state = None ,
@@ -1276,8 +1286,13 @@ class RidgeClassifier(_RidgeClassifierMixin, _BaseRidge):
1276
1286
Maximum number of iterations for conjugate gradient solver.
1277
1287
The default value is determined by scipy.sparse.linalg.
1278
1288
1279
- tol : float, default=1e-3
1280
- Precision of the solution.
1289
+ tol : float, default=1e-4
1290
+ Precision of the solution. Note that `tol` has no effect for solvers 'svd' and
1291
+ 'cholesky'.
1292
+
1293
+ .. versionchanged:: 1.2
1294
+ Default value changed from 1e-3 to 1e-4 for consistency with other linear
1295
+ models.
1281
1296
1282
1297
class_weight : dict or 'balanced', default=None
1283
1298
Weights associated with classes in the form ``{class_label: weight}``.
@@ -1397,7 +1412,7 @@ def __init__(
1397
1412
normalize = "deprecated" ,
1398
1413
copy_X = True ,
1399
1414
max_iter = None ,
1400
- tol = 1e-3 ,
1415
+ tol = 1e-4 ,
1401
1416
class_weight = None ,
1402
1417
solver = "auto" ,
1403
1418
positive = False ,
0 commit comments