I created a model with sklearn for classification. When I call the function y_pred2 = clf.predict (features2) it returns a list with all the ids of my prediction
y_pred2 = clf.predict(features2)
Print Array
array([**5**, 5, 5, 1, 6, 1, 6, 1, 1, 1])
Up here I can add it to my dataframe without any problem df ['prediction'] = y_pred2
But I also want to record my multi-class probability at the best value
y_pred2 = clf.predict_proba(features2)[0]
array([0.02670249, 0.23888486, 0.00940765, 0.15213608, 0.02719888,
**0.42038983**, 0.07503347, 0.02960037, 0.02064636])
But I also want to record the probability of my multi-class by the best value, but the return from the predict_proba function returns an array of all my class, how can I do to record the value of my prediction score.
Example according to my prediction my best class and first position 5 where probability value was 0.42038983. C
How can I take the best value from my array and write to my dataframe?
Ylook like before training?