title: ValueError: bad input shape in sklearn Python
body: <p>I have 2 List <code>features</code> and <code>labels</code>. 
  <code>features</code> contains <strong>Diseases</strong>, <strong>Age</strong>, <strong>Gender</strong> , <strong>PIN</strong>.
  <code>labels</code> contains <strong>Health-Plan</strong>.</p>
  
  <p>User passes the <code>user_input</code>, which is in the format of <code>features</code>. So, the code should Predict the Health-Plan for the user using <code>DecisionTree</code> of <code>sklearn</code> API.</p>
  
  <p>As few parameters in <code>features</code> are <code>Strings</code>. Eg <strong>Diseases</strong> and <strong>Gender</strong>. I am encoding them using <code>LabelEncoder</code> to avoid error '<code>ValueError: could not convert string to float</code>' . </p>
  
  <p>Now, after using <code>Label Encoder</code>, I got the following exception '<code>ValueError: bad input shape</code>'</p>
  
  <p>How can I fix the issue and again reverse the encoding done to avoid <code>String to Float</code> error. Please help.</p>
  
  <pre><code>from sklearn import tree
  from sklearn.preprocessing import LabelEncoder
  features = [['TB' , 28, 'MALE', 121001], ['TB' , 28, 'FEMALE', 121002], ['CANCER' , 28, 'MALE', 121001], ['CANCER' , 28, 'FEMALE', 121001]]
  labels = ['X125434', 'X125436','X125437' , 'X125437']
  user_input = ['TB' , 28, 'MALE', 121001]
  
  le = LabelEncoder()
  
  Y = le.fit_transform(features)
  X = le.fit_transform(labels)
  new_user_input = le.fit_transform(user_input)
  
  clf = tree.DecisionTreeClassifier()
  clf = clf.fit(new_features, new_labels)
  
  print(clf.predict([new_ui]))
  </code></pre>