Use fixed random seed for generating X in test_mlp.test_gradient()
@@ -177,7 +177,8 @@ def test_gradient():
for n_labels in [2, 3]:
n_samples = 5
n_features = 10
- X = np.random.random((n_samples, n_features))
+ random_state = np.random.RandomState(seed=42)
+ X = random_state.rand(n_samples, n_features)
y = 1 + np.mod(np.arange(n_samples) + 1, n_labels)
Y = LabelBinarizer().fit_transform(y)
