8000 Fix linting issue and format with black · scikit-learn/scikit-learn@2b8610e · GitHub
[go: up one dir, main page]

Skip to content
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

Commit 2b8610e

Browse files
committed
Fix linting issue and format with black
1 parent 204dc95 commit 2b8610e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

examples/linear_model/plot_sparse_logistic_regression_mnist.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import matplotlib.pyplot as plt
2727
import numpy as np
2828

29-
from sklearn.datasets import fetch_openml
29+
# from sklearn.datasets import fetch_openml
3030
from sklearn.datasets import load_digits
3131
from sklearn.linear_model import LogisticRegression
3232
from sklearn.model_selection import train_test_split
@@ -56,7 +56,13 @@
5656
X_train = scaler.fit_transform(X_train)
5757
X_test = scaler.transform(X_test)
5858

59-
clf = LogisticRegression(C=20.0 / train_samples, penalty="l1", solver="saga", tol=0.1, random_state=random_state)
59+
clf = LogisticRegression(
60+
C=20.0 / train_samples,
61+
penalty="l1",
62+
solver="saga",
63+
tol=0.1,
64+
random_state=random_state,
65+
)
6066
clf.fit(X_train, y_train)
6167
sparsity = np.mean(clf.coef_ == 0) * 100
6268
score = clf.score(X_test, y_test)

0 commit comments

Comments
 (0)
0