Suppose I have created a model, and my target variable is either 0, 1 or 2. It seems that if I use predict, the answer is either of 0, or 1 or 2. But if I use predict_proba, I get a row with 3 cols for each row as follows, for example
model = ... Classifier # It could be any classifier
m1 = model.predict(mytest)
m2= model.predict_proba(mytest)
# Now suppose m1[3] = [0.6, 0.2, 0.2]
Suppose I use both predict and predict_proba. If in index 3, I get the above result with the result of predict_proba, in index 3 of the result of predict I should see 0. Is this the case? I am trying to understand how using both predict and predict_proba on the same model relate to each other.
predictandpredict_proba, so we can ground the discussion in an actual (and not hypothetical) case.m1is supposed to contain single numbers (classes), while here you show it as if containing probabilities. Please, take your time, focus, and update/clarify the question accordingly (the idea was to get rid of "suppose", by showing an actual example of bothpredictandpredict_probaon the same test sample and focus the question on this, but you haven't done so).