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.