8000 update warning · scikit-learn/scikit-learn@c3c6e8f · GitHub
[go: up one dir, main page]

Skip to content

Commit c3c6e8f

Browse files
committed
update warning
1 parent b7360c7 commit c3c6e8f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sklearn/linear_model/ridge.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,11 @@ def _ridge_regression(X, y, alpha, sample_weight=None, solver='auto',
367367
return_n_iter=False, return_intercept=False,
368368
X_scale=None, X_offset=None):
369369

370-
if (return_intercept and sparse.issparse(X) and
371-
solver not in ['sag', 'sparse_cg']):
370+
if return_intercept and sparse.issparse(X) and solver != 'sag':
372371
if solver != 'auto':
373-
warnings.warn("In Ridge, only 'sag' and 'sparse_cg' solvers "
374-
"can currently fit the intercept when X is sparse."
375-
" Solver has been automatically changed into 'sag'.")
372+
warnings.warn("In Ridge, only 'sag' solver can currently fit the "
373+
"intercept when X is sparse. Solver has been "
374+
"automatically changed into 'sag'.")
376375
solver = 'sag'
377376

378377
_dtype = [np.float64, np.float32]

0 commit comments

Comments
 (0)
0