8000 DOC change logreg solver in plot_logistic_path (#15927) · scikit-learn/scikit-learn@f65cdf2 · GitHub
[go: up one dir, main page]

Skip to content

Commit f65cdf2

Browse files
agramfortglemaitre
authored andcommitted
DOC change logreg solver in plot_logistic_path (#15927)
1 parent 0abd48b commit f65cdf2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/linear_model/plot_logistic_path.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
coefficients are exactly 0. When regularization gets progressively looser,
1515
coefficients can get non-zero values one after the other.
1616
17-
Here we choose the SAGA solver because it can efficiently optimize for the
17+
Here we choose the liblinear solver because it can efficiently optimize for the
1818
Logistic Regression loss with a non-smooth, sparsity inducing l1 penalty.
1919
2020
Also note that we set a low value for the tolerance to make sure that the model
@@ -55,9 +55,10 @@
5555

5656
print("Computing regularization path ...")
5757
start = time()
58-
clf = linear_model.LogisticRegression(penalty='l1', solver='saga',
58+
clf = linear_model.LogisticRegression(penalty='l1', solver='liblinear',
5959
tol=1e-6, max_iter=int(1e6),
60-
warm_start=True)
60+
warm_start=True,
61+
intercept_scaling=10000.)
6162
coefs_ = []
6263
for c in cs:
6364
clf.set_params(C=c)

0 commit comments

Comments
 (0)
0