I would like to receive an assessment of the confidence of each of the forecasts that it makes, showing how confident that the classifier is correct in its prediction.
I need something like this:
How confident is the classifier in its prediction?
Class 1: 81%, which is class 1
Class 2: 10%
Class 3: 6%
Class 4: 3%
Samples of my code:
features_train, features_test, labels_train, labels_test = cross_validation.train_test_split(main, target, test_size = 0.4)
I suspect that I will use the score () function, but I seem to continue to execute it correctly. I do not know if this function is correct or not, but how to get the percentage of confidence from the forecast of the classifier?
source share