8000 Changed to random_state · rmurcek/scikit-learn@8320331 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8320331

Browse files
author
maheshakya
committed
Changed to random_state
1 parent 5348177 commit 8320331

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sklearn/dummy.py

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

1515

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

276275

277276
class DummyRegressor(BaseEstimator, RegressorMixin):
278-
279277
"""
280278
DummyRegressor is a regressor that always predicts the mean of the training
281279
targets.

sklearn/tests/test_dummy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ def test_constants_not_specified_regressor():
336336

337337

338338
def test_constant_size_multioutput_regressor():
339-
X = np.random.randn(10, 10)
340-
y = np.random.randn(10, 5)
339+
random_state = np.random.RandomState(seed=1)
340+
X = random_state.randn(10, 10)
341+
y = random_state.randn(10, 5)
341342

342343
est = DummyRegressor(strategy='constant', constant=[1, 2, 3, 4])
343344
assert_raises(ValueError, est.fit, X, y)

0 commit comments

Comments
 (0)
0