[Numpy-discussion] Maximum-margin linear classifier
njs at pobox.com
Sun Nov 30 09:22:43 EST 2014
While you might get responses here, you'll probably have better luck asking
on the scikit-learn list. (I assume you are using scikit-learn for the
svm?) That's where you'll find experts on the details of these models
hanging out - this is the list for numpy itself, and numpy doesn't include
svms or plotting support directly. (StackOverflow is also sometimes a good
place to try for general questions that aren't really specific to any one
On 30 Nov 2014 07:36, "Mohan Radhakrishnan" <radhakrishnan.mohan at gmail.com>
> 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)
> for i in range(4):
> x = np.array(X[i])*clf.coef_ + np.array(X[i])*clf.coef_[0
> ] + clf.intercept_;
> print x
> print clf.intercept_
> print clf.coef_
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion