8000 fixed pep8 errors in dummy.py · rmurcek/scikit-learn@5348177 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5348177

Browse files
author
maheshakya
committed
fixed pep8 errors in dummy.py
1 parent 5158913 commit 5348177

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

sklearn/dummy.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515

1616
class DummyClassifier(BaseEstimator, ClassifierMixin):
17+
1718
"""
1819
DummyClassifier is a classifier that makes predictions using simple rules.
1920
@@ -274,6 +275,7 @@ def predict_log_proba(self, X):
274275

275276

276277
class DummyRegressor(BaseEstimator, RegressorMixin):
278+
277279
"""
278280
DummyRegressor is a regressor that always predicts the mean of the training
279281
targets.
@@ -286,7 +288,7 @@ class DummyRegressor(BaseEstimator, RegressorMixin):
286288
`constant_' : float or array of shape [n_outputs]
287289
Mean or median of the training targets or constant value given the by
288290
the user.
289-
291+
290292
`n_outputs_` : int,
291293
Number of outputs.
292294
@@ -324,7 +326,8 @@ def fit(self, X, y):
324326
"""
325327

326328
if self.strategy not in ("mean", "median", "constant"):
327-
raise ValueError("Unknown strategy type: %s, expected 'mean, 'median' or 'constant'"
329+
raise ValueError("Unknown strategy type: %s, "
330+
"expected 'mean', 'median' or 'constant'"
328331
% self.strategy)
329332

330333
y = safe_asarray(y)
@@ -345,8 +348,8 @@ def fit(self, X, y):
345348

346349
if self.output_2d_ and self.constant.shape[0] != y.shape[1]:
347350
raise ValueError(
348-
"Constant target value should have "
349-
"shape (%d, 1)." % y.shape[1])
351+
"Constant target value should have "
352+
"shape (%d, 1)." % y.shape[1])
350353

351354
self.constant_ = np.reshape(self.constant, (1, -1))
352355

0 commit comments

Comments
 (0)
0