title: Why random forest always give 1.0 prediction score?
body: <p>I'm trying to test the prediction score of the following classifiers:</p>
  
  <pre><code>- random forest
  - k neighbors
  - svm
  - naïve bayes
  </code></pre>
  
  <p>I'm not using feature selection or feature scaling (no preprocessing at all).</p>
  
  <p>I'm using a train-test split as follows:</p>
  
  <pre><code>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.3)
  </code></pre>
  
  <p>I tested several datasets (from <code>sklearn</code>):</p>
  
  <pre><code>- load_iris
  - load_breast_cancer
  - load_wine
  </code></pre>
  
  <p>In all those 3, random forest always gave perfect prediction (test accuracy 1.0).</p>
  
  <p>I tried to create random samples for classification:</p>
  
  <pre><code>make_classification(flip_y=0.3, weights = [0.65, 0.35], n_features=40, n_redundant=4, n_informative=36,n_classes=2,n_clusters_per_class=1, n_samples=50000)
  </code></pre>
  
  <p>and again random forest gave perfect prediction on the test set (accuracy 1.0).</p>
  
  <p>All the other classifiers gave good performance on the test set (0.8-0.97) but not perfect (1.0) as random forest.</p>
  
  <ul>
  <li>What am I missing ?</li>
  <li>Does random forest really outperforms all other classifiers in a perfect way ?</li>
  </ul>