title: Scikit-learn RandomForestClassifier output of predict_proba
body: <p>I have a dataset that I split in two for training and testing a random forest classifier with <em>scikit learn</em>. </p>
  
  <p>I have 87 classes and 344 samples. The output of <code>predict_proba</code> is, most of the times, a 3-dimensional array <code>(87, 344, 2)</code> (it's actually a <code>list</code> of 87 <code>numpy.ndarray</code>s of <code>(344, 2)</code> elements). </p>
  
  <p>Sometimes, when I pick a different subset of samples for training and testing, I only get a 2-dimensional array <code>(87, 344)</code> (though I can't work out in which cases). </p>
  
  <p>My two questions are:</p>
  
  <ul>
  <li>what do these dimensions represent? I worked out that to get a ROC AUC score, I have to take one half of the output (that is <code>(87, 344, 2)[:,:,1]</code>, transpose it, and then compare it with my ground truth (<code>roc_auc_score(ground_truth, output_of_predict_proba[:,:,1].T)</code> essentially) . But I don't understand what it really means. </li>
  <li>why does the output change with different subsets of the data? I can't understand in which cases it returns a 3D array and in which cases a 2D one. </li>
  </ul>