def test_multiclass_probas(): mlp = MLP(epochs=500, eta=0.5, hidden_layers=[10], optimizer='gradientdescent', activations=['logistic'], minibatches=1, random_seed=1) mlp.fit(X, y) idx = [0, 50, 149] # sample labels: 0, 1, 2 y_pred = mlp.predict_proba(X[idx]) exp = np.array([[1.0, 0.0, 0.0], [0.0, 0.9, 0.1], [0.0, 0.1, 0.9]]) np.testing.assert_almost_equal(y_pred, exp, 1)