Skip to content

Commit

Permalink
TST Use random state to initialize MLPClassifier. (#12892)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhan7279 authored and qinhanmin2014 committed Jan 27, 2019
1 parent 1f5bcae commit 3207278
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sklearn/neural_network/tests/test_mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ def test_predict_proba_binary():
X = X_digits_binary[:50]
y = y_digits_binary[:50]

clf = MLPClassifier(hidden_layer_sizes=5)
clf = MLPClassifier(hidden_layer_sizes=5, activation='logistic',
random_state=1)
with ignore_warnings(category=ConvergenceWarning):
clf.fit(X, y)
y_proba = clf.predict_proba(X)
Expand Down

0 comments on commit 3207278

Please sign in to comment.