Hi,
I'm running the code that prints the model.predict, model.predict_proba in binary classification. The problem is the probabilities from predict_proba() don't appear to match the predicted class from predict(). See the sample of the code and the printout below:
It shows all test data having the highest probability to the second class. I did try to do it on other dataset with binary class (livers disorder and HCC survival from UCI), but almost all of predict_proba result was having the highest probability to the second class and it didnt match with model.predict results.
I also tried to do it on dataset with multi class datasets (iris, dermatology, and breast tissue from UCI), the results of predict is matching with predict_proba. So i think the problem is only occurs on binary classification.
How can i get predict results that match with predict_proba in binary classification?
Hi, I'm running the code that prints the model.predict, model.predict_proba in binary classification. The problem is the probabilities from predict_proba() don't appear to match the predicted class from predict(). See the sample of the code and the printout below:
Result : pred [1 1 2 1 1 1] proba [[0.39689426 0.60310574] [0.39158382 0.60841618] [0.33327835 0.66672165] [0.39609943 0.60390057] [0.39689428 0.60310572] [0.39689424 0.60310576]]
It shows all test data having the highest probability to the second class. I did try to do it on other dataset with binary class (livers disorder and HCC survival from UCI), but almost all of predict_proba result was having the highest probability to the second class and it didnt match with model.predict results.
I also tried to do it on dataset with multi class datasets (iris, dermatology, and breast tissue from UCI), the results of predict is matching with predict_proba. So i think the problem is only occurs on binary classification.
How can i get predict results that match with predict_proba in binary classification?