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 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_   

Output:

  [[0. 0.] [1. 1.]]   

The Libycan scales are better than a large number of samples, but otherwise they are mostly equal.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -