show the first few entries of predict_proba print("predicted probabilities:\ {}format(gbrt predict_proba(x_test)[: ])show that sums across rows are one print("sums{}format(gbrt predict_proba(x_test)[: sum(axis= ))out[ ]predicted probabilities[ ]sums we can again recover the predictions by computing the argmax of predict_probain[ ]print("argmax of predicted probabilities:\ {}formatnp argmax(gbrt predict_proba(x_test)axis= ))print("predictions:\ {}format(gbrt predict(x_test))out[ ]argmax of predicted probabilities[ predictions[ to summarizepredict_proba and decision_function always have shape (n_sam plesn_classes)--apart from decision_function in the special binary case in the binary casedecision_function only has one columncorresponding to the "positiveclass classes_[ this is mostly for historical reasons you can recover the prediction when there are n_classes many columns by computing the argmax across columns be carefulthoughif your classes are stringsor you use integers but they are not consecutive and starting from if you want to compare results obtained with predict to results obtained via decision_function or pre dict_probamake sure to use the classes_ attribute of the classifier to get the actual class names supervised learning