Scikit learn 如何在支持向量机(SVM)训练后提取完整的模型信息?

Scikit learn 如何在支持向量机(SVM)训练后提取完整的模型信息?,scikit-learn,svm,Scikit Learn,Svm,我正在使用“sklearn.svm”进行基本的svm训练。对于SVC,是否有方法打印文档中描述的模型详细信息: 注意:我不是说可以通过“get_params”或“set_params”访问的参数。我指的是作为算法结果确定的实际系数。来自SVC文档: Attributes: support_ : array-like, shape = [n_SV] Indices of support vectors. support_vectors_ : array-like, shape

我正在使用“sklearn.svm”进行基本的svm训练。对于SVC,是否有方法打印文档中描述的模型详细信息:


注意:我不是说可以通过“get_params”或“set_params”访问的参数。我指的是作为算法结果确定的实际系数。

来自SVC文档:

Attributes: 

support_ : array-like, shape = [n_SV]
    Indices of support vectors.
    support_vectors_ : array-like, shape = [n_SV, n_features]
    Support vectors.

n_support_ : array-like, dtype=int32, shape = [n_class]
    Number of support vectors for each class.

dual_coef_ : array, shape = [n_class-1, n_SV]
    Coefficients of the support vector in the decision function. For       
    multiclass, coefficient for all 1-vs-1 classifiers. The layout of   
    the coefficients in the multiclass case is somewhat non-trivial. 
    See the section about multi-class classification in the SVM 
     section of the User Guide for details.

coef_ : array, shape = [n_class-1, n_features]

      Weights assigned to the features (coefficients in the primal  
      problem). This is only available in the case of a linear 
      kernel.

      coef_ is a readonly property derived from dual_coef_ and  
      support_vectors_.

intercept_ : array, shape = [n_class * (n_class-1) / 2]
      Constants in decision function.
可以从该属性派生有关模型的所有信息

例如:
clf.n\u支持
将返回模型的
n\u支持

Attributes: 

support_ : array-like, shape = [n_SV]
    Indices of support vectors.
    support_vectors_ : array-like, shape = [n_SV, n_features]
    Support vectors.

n_support_ : array-like, dtype=int32, shape = [n_class]
    Number of support vectors for each class.

dual_coef_ : array, shape = [n_class-1, n_SV]
    Coefficients of the support vector in the decision function. For       
    multiclass, coefficient for all 1-vs-1 classifiers. The layout of   
    the coefficients in the multiclass case is somewhat non-trivial. 
    See the section about multi-class classification in the SVM 
     section of the User Guide for details.

coef_ : array, shape = [n_class-1, n_features]

      Weights assigned to the features (coefficients in the primal  
      problem). This is only available in the case of a linear 
      kernel.

      coef_ is a readonly property derived from dual_coef_ and  
      support_vectors_.

intercept_ : array, shape = [n_class * (n_class-1) / 2]
      Constants in decision function.