How to find the corresponding class in clf.predict_proba()
Just use the .classes_
attribute of the classifier to recover the mapping. In your example that gives:
>>> clf.classes_
array(['one', 'three', 'two'],
dtype='|S5')
And thanks for putting a minimalistic reproduction script in your question, it makes answering really easy by just copy and pasting in a IPython shell :)
import pandas as pd
test = [[0,1,1,0],[1,1,1,0]]
pd.DataFrame(clf.predict_proba(test), columns=clf.classes_)
Out[2]:
one three two
0 0.542815 0.361876 0.095309
1 0.306431 0.612863 0.080706