Unfortunately, there seems to be no way to do this. LinearSVC calls liblinear ( see related code ), but does not extract vectors, but only coefficients and intercepts.
One option would be to use SVC with a "linear" kernel (libsvm instead of liblinear based), but also supports poly , dbf and sigmoid :
from sklearn import svm X = [[0, 0], [1, 1]] y = [0, 1] clf = svm.SVC(kernel='linear') clf.fit(X, y) print clf.support_vectors_
Output:
[[ 0. 0.] [ 1. 1.]]
liblinear scales better for a large number of samples, but otherwise they are mostly equivalent.
source share