SciKit-Learn: predict values sometimes different from top predict_proba entries?
This seems to be a bug in the library. 

https://github.com/scikit-learn/scikit-learn/issues/17035

The issue is predict_proba does not convert from its internal representation of categories to the dataset's representation before returning the data. Client-side we can convert using some internal APIs:

&gt; [text_clf._final_estimator.classes_[max(enumerate(prob), key=lambda p: p[1])[0]] for prob in text_clf.predict_proba(test.data)]
[61, 16, 11, 16, 11, 89, 26, 33, 16, 57, 16, 118, 11, 26, ...]
&gt; [*text_clf.predict(test.data)]
[61, 16, 11, 16, 11, 89, 26, 33, 16, 57, 16, 118, 11, 26, ...]


But the real fix needs to happen in the library.