我正在处理文本分类问题(情感分析)。我想知道 scikit-learn 中是否有任何选项可以为特征添加“权重”(作为重要性的衡量标准)。我检查了文档,发现SVC 的属性“coefs”,定义如下:
coef_ array, shape = [n_class-1, n_features]
Weights asigned to the features (coefficients in the primal problem).
This is only available in the case of linear kernel.coef_ is readonly property derived from dual_coef_ and support_vectors_
但是,此属性似乎是只读的。