30 Nov
2014
30 Nov
'14
1:06 p.m.
Hi, I am a beginner. I have 4 points and wish to plot the classifier separation line. I believe this code without the plot is correct. Can I look at sample plotting code(with basic explanation) for this simple SVM ? X = [[3,3], [7,2], [5,4], [8,3]] Y = [-1, -1, 1, 1] clf = svm.SVC(kernel='linear',C=2) clf.fit(X,Y) for i in range(4): x = np.array(X[i])[0]*clf.coef_[0][0] + np.array(X[i])[1]*clf.coef_[0][1] + clf.intercept_; print x print clf.intercept_ print clf.coef_ Thanks, Mohan