I want to train and test my data with Skitlearn MLPClassifier but I got ValueError: Can't handle mix of multiclass and multilabel-indicator error. Here is my code:
mlp = MLPClassifier(hidden_layer_sizes=(HIDDEN_1_COUNT,HIDDEN_2_COUNT),
activation="logistic",
solver="sgd",
max_iter=EPOCH_COUNT,
learning_rate_init=LEARNING_RATE)
mlp.fit(dataset_train, labels_train)
print(mlp.score(dataset_test, np.reshape(labels_test, (20, 1))))
According to PyCharm error happens at the last line.
Shape of dataset_test: 20x901, labels_test: 1x20
P.S: If I use labels_test instead of np.reshape(labels_test, (20,1)) I got ValueError: Found input variables with inconsistent numbers of samples: [1, 20] error. I couldn't find exact solution for both of them.