lamiastella

'sklearn.svm' has no attribute 'decision_function'

Nov 30th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. AttributeError Traceback (most recent call last)
  3. <ipython-input-140-be276d1b533a> in <module>()
  4. 1 plot_data()
  5. ----> 2 plot_boundary(svm,-.5,.3,-.8,.6)
  6.  
  7. <ipython-input-139-3129f6a17cc1> in plot_boundary(my_svm, xmin, xmax, ymin, ymax)
  8. 19 #Z = my_svm.SVC.predict(Xval, yval)
  9. 20
  10. ---> 21 Z = my_svm.decision_function(np.c_[xx.ravel(), yy.ravel()])
  11. 22 #Z = clf.predict_proba(np.c_[xx.ravel(), yy.ravel()])[:, 1]
  12. 23
  13.  
  14. AttributeError: module 'sklearn.svm' has no attribute 'decision_function'
Add Comment
Please, Sign In to add comment