title: Random forest classifier result from Predict_proba() does not match with predict()?
body: <pre><code>from sklearn.model_selection import train_test_split
  from sklearn.feature_extraction.text import CountVectorizer
  from sklearn.feature_extraction.text import TfidfTransformer
  
  from sklearn.ensemble import RandomForestClassifier
  pipeline = Pipeline([
  ('features', FeatureUnion([
      ('Comments',Pipeline([
          ('selector',ItemSelector(column = "Comments")),
          ('tfidf',TfidfVectorizer(use_idf=False,ngram_range=(1,2),max_df=0.95, min_df=0,sublinear_tf=True)),
      ])),
      ('Vendor', Pipeline([
          ('selector',ItemSelector(column = "Vendor Name")),
          ('tfidf',TfidfVectorizer(use_idf=False)),
  
      ]))
  ])),
  ('clf',RandomForestClassifier(n_estimators =200, max_features='log2',criterion = 'entropy',random_state = 45))
   #('clf',LogisticRegression())
   ])
  
  
  X_train, X_test, y_train, y_test = train_test_split(X,
                                  df['code Description'],
                                  test_size = 0.3, 
                                  train_size = 0.7,
                                  random_state = 100)
  model = pipeline.fit(X_train, y_train)
  s = pipeline.score(X_test,y_test)
  pred = model.predict(X_test)
  predicted =model.predict_proba(X_test)
  </code></pre>
  
  <p>for some of classification my <code>predict</code> is matching with prediction score. but in some cases,</p>
  
  <pre><code>proba_predict = [0.3,0.18,0.155]
  </code></pre>
  
  <p>but instead of classifying it as class A, it is classifying as Class B.</p>
  
  <p>Predict class: B</p>
  
  <p>Actual Class : A </p>
  
  <p>Right side column is my labels and left side column is my input text data:</p>
  
  <p><a href="https://i.stack.imgur.com/slRNs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/slRNs.png" alt="enter image description here"></a></p>