title: Predict probabilities using SVM
body: <p>I wrote this code and wanted to obtain probabilities of classification.</p>
  
  <pre><code>from sklearn import svm
  X = [[0, 0], [10, 10],[20,30],[30,30],[40, 30], [80,60], [80,50]]
  y = [0, 1, 2, 3, 4, 5, 6]
  clf = svm.SVC() 
  clf.probability=True
  clf.fit(X, y)
  prob = clf.predict_proba([[10, 10]])
  print prob
  </code></pre>
  
  <p>I obtained this output:</p>
  
  <pre><code>[[0.15376986 0.07691205 0.15388546 0.15389275 0.15386348 0.15383004 0.15384636]]
  </code></pre>
  
  <p>which is very weird because the probability should have been</p>
  
  <pre><code>[0 1 0 0 0 0 0 0]
  </code></pre>
  
  <p>(Observe that the sample for which class has to be predicted is same as 2nd sample) also, probability obtained for that class is the lowest. </p>