2011-06-10 81 views
0

我正在嘗試爲支持向量機起草PMML文檔,並對dmg.org中指定的SupportVectorMachine標記的targetCategory屬性感到困惑。我的問題是,如果有兩個以上的分類器,該如何工作?是否需要一個targetCategory和其他alternateTargetCategory屬性?難以理解PMML的targetCategory屬性

由於虹膜數據集,我猜它會是這樣的:

<SupportVectorMachine targetCategory="Iris-setosa" alternateTargetCategory="Iris-versicolor" alternateTargetCategory="Iris-virginica"> 

回答

0

我看了看周圍的一些越來越找到了答案,以我自己的問題。有一個名爲KNIME的免費應用程序,可以直接使用並生成PMML輸出。事實證明,alternateTargetCategory僅用於二進制分類。對於Iris數據集,SupportVectorMachine的輸出如下:

<SupportVectorMachine targetCategory="1"> 
    <SupportVectors numberOfAttributes="4" numberOfSupportVectors="3"> 
    <SupportVector vectorId="1_1_23"/> 
    <SupportVector vectorId="1_1_41"/> 
    <SupportVector vectorId="2_2_98"/> 
    </SupportVectors> 
    <Coefficients numberOfCoefficients="3" absoluteValue="-1.2257883098134195"> 
    <Coefficient value="0.0082595394670607"/> 
    <Coefficient value="5.981904829451028E-4"/> 
    <Coefficient value="0.008857729950005803"/> 
    </Coefficients> 
</SupportVectorMachine> 
<SupportVectorMachine targetCategory="2"> 
    <SupportVectors numberOfAttributes="4" numberOfSupportVectors="16"> 
    ... etc.