title: Probabilities for computers decision in ML?
body: <p>Phrased this quite badly, but what I am trying to ask is say how can I display percentage of confidence in predicting something with a classification algorithm? I am using Scikit-learn. </p>
  
  <p>Say that I am trying to identify whether something is an apple or orange based on texture and weight: </p>
  
  <pre><code>#Features:  0 = "bumpy" 1 = "smooth"
  #Labels:    0 = apple 1 = orange
  features = [[140, 1], [130, 1], [150, 0], [170, 0]]
  labels = [0, 0, 1, 1]
  
  # We will be using a Decision Tree in this instance
  clf = tree.DecisionTreeClassifier()
  clf = clf.fit(features, labels)
  print(clf.predict([[160, 0]]))
  </code></pre>
  
  <p>So with predicting the <code>[160, 0]</code>, based on the pattern, we and the computer will predict that this is most likely to be an orange. <strong>Is there a way with Scikit-learn that I can predict the confidence the computer has in returning either a 1 or a 0?</strong> This is especially important when I have more parameters in the feature vector.</p>