python - scikit-learn, linearsvc - how to get support vectors from the trained SVM? -
I am using LinearSVC from the scikit-learning library and I think that in any way it is possible to pull out the vectors which uses my model, so I wonder
After trying to predict some time after the training, but without any luck. Anyone know?
Unfortunately, there is no way to do this LinearSVC calls Libin () but the vector is Does not receive, only coefficients and interceptions
An optional SVC will have to experiment with 'linear' kernel (libsvm instead of Libis instead of the Libnin), but Output: The Libycan scales are better than a large number of samples, but otherwise they are mostly equal. poly
dbf and
sigmoid kernel supports this option: Scalone import SVM X = [[0, 0], [1, 1]] y = [0, 1] clf = ssm
SVC (kernel = 'linear') clf.fit (x, y) print clf.support_vectors_
[[0. 0.] [1. 1.]]
Comments
Post a Comment