title: Decision tree only predicts one class
body: <p>I am fitting decision tree on the following dataset:</p>
  
  <pre><code>https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data
  </code></pre>
  
  <p>And following is my code:</p>
  
  <pre><code>balance_data=pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data",
                             sep= ',', header= None)
  
  le = preprocessing.LabelEncoder()
  balance_data = balance_data.apply(le.fit_transform)
  X = balance_data.values[:, 0:5]
  Y = balance_data.values[:,6]
  X_train, X_test, y_train, y_test = train_test_split( X, Y, test_size = 0.2, random_state = 100)
  
  #using Gini index
  clf_gini = DecisionTreeClassifier(criterion = "gini", random_state = 100,
                                 max_depth=3, min_samples_leaf=5)
  
  clf_gini.fit(X_train, y_train)
  
  #using Information Gain
  clf_entropy = DecisionTreeClassifier(criterion = "entropy", random_state = 100,
   max_depth=3, min_samples_leaf=5)
  clf_entropy.fit(X_train, y_train)
  
  
  #Gini prediction
  y_pred = clf_gini.predict(X_test)
  y_pred
  
  #IG prediction
  y_pred_en = clf_entropy.predict(X_test)
  y_pred_en
  </code></pre>
  
  <p>In both cases Gini Index and IG, the output is following:</p>
  
  <pre><code>array([2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
         2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,])
  </code></pre>
  
  <p>Is there problem with training? Moreover how can I convert this numeric value to string value.</p>
  
  <p>Edit1: I calculated the accuracy and it says 71. Is there a possibility that the only problem is in the display of the output?</p>