Skip to content

Navigation Menu

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 4bc8822

Browse filesBrowse files
committed
COSMIT pep8
1 parent e686e38 commit 4bc8822
Copy full SHA for 4bc8822

File tree

Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed

‎examples/svm/plot_svm_scale_c.py

Copy file name to clipboardExpand all lines: examples/svm/plot_svm_scale_c.py
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@
101101
n_features = 300
102102

103103
# L1 data (only 5 informative features)
104-
X_1, y_1 = datasets.make_classification(n_samples=n_samples, n_features=n_features,
105-
n_informative=5, random_state=1)
104+
X_1, y_1 = datasets.make_classification(n_samples=n_samples,
105+
n_features=n_features, n_informative=5, random_state=1)
106106

107107
# L2 data: non sparse, but less features
108108
y_2 = np.sign(.5 - rnd.rand(n_samples))
109-
X_2 = rnd.randn(n_samples, n_features/5) + y_2[:, np.newaxis]
110-
X_2 += 5 * rnd.randn(n_samples, n_features/5)
109+
X_2 = rnd.randn(n_samples, n_features / 5) + y_2[:, np.newaxis]
110+
X_2 += 5 * rnd.randn(n_samples, n_features / 5)
111111

112112
clf_sets = [(LinearSVC(penalty='L1', loss='L2', dual=False,
113113
tol=1e-3),
@@ -140,12 +140,11 @@
140140
pl.subplot(2, 1, subplotnum + 1)
141141
pl.xlabel('C')
142142
pl.ylabel('CV Score')
143-
grid_cs = cs * float(scaler) # scale the C's
143+
grid_cs = cs * float(scaler) # scale the C's
144144
pl.semilogx(grid_cs, scores, label="fraction %.2f" %
145145
train_size)
146146
pl.title('scaling=%s, penalty=%s, loss=%s' %
147147
(name, clf.penalty, clf.loss))
148148

149149
pl.legend(loc="best")
150150
pl.show()
151-

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.