【问题标题】:In scipy classification models (such as the svm.svc), how can one get a list of the names for all classes?在 scipy 分类模型(例如 svm.svc)中,如何获得所有类的名称列表?
【发布时间】:2016-12-03 08:13:42
【问题描述】:

在 scipy 分类模型(例如 svm.svc)中,如何获得模型可能将点分类到的所有类的名称列表?

【问题讨论】:

标签: python machine-learning scikit-learn classification svm


【解决方案1】:

对于svm.SVC(以及许多其他模型,如 LogisticRegression 等),有一个属性 classes_ 因此在训练模型 clf 上你可以这样做

print clf.classes_

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-25
    • 2022-01-12
    • 2011-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-10
    • 1970-01-01
    相关资源
    最近更新 更多