我正在使用python中来自SciKit库的SciKit来对文本数据进行分类,并且它工作得很好。我的问题是,有办法找到我的分类器模型的支持向量吗?我想我的数据的支持向量应该是一个单词列表!
我需要这样做,因为我想为不同的文本数据找到分类器的一个显著特征。(不同的文本数据是如何区分的)
提前谢谢。
发布于 2014-07-17 09:30:43
对于scikit中的SVM案例--学习,您应该能够以以下方式访问支持向量:
>>> # get support vectors
>>> clf.support_vectors_
array([[ 0., 0.],
[ 1., 1.]])
>>> # get indices of support vectors
>>> clf.support_
array([0, 1]...)
>>> # get number of support vectors for each class
>>> clf.n_support_
array([1, 1]...)[资料来源:http://scikit-learn.org/stable/modules/svm.html ]
https://stackoverflow.com/questions/23090420
复制相似问题