【问题标题】:What is the prediction file in SVMlight?SVMlight 中的预测文件是什么?
【发布时间】:2014-04-15 07:35:26
【问题描述】:

我是 SVMlight 的新手。我下载了源代码并编译了 SVMlight。

我创建了训练和测试数据集。然后跑了

[command]

创建模型文件。使用这个模型文件,我运行 svm_classify 创建一个预测文件。预测文件包含一些值。

这些数字代表什么?我想将我的数据分类为 -1 和 +1,但我在预测文件中没有看到这样的值。

模型文件:

SVM-light Version V6.02
0 # kernel type
3 # kernel parameter -d 
1 # kernel parameter -g 
1 # kernel parameter -s 
1 # kernel parameter -r 
empty# kernel parameter -u 
9947 # highest feature index 
2000 # number of training documents 
879 # number of support vectors plus 1 
-0.13217617 # threshold b, each following line is a SV (starting with alpha*y)
-1.0000000005381390888459236521157 6:0.013155501 9:0.10063701 27:0.038305663    41:0.12115256 63:0.056871183 142:0.020468477 206:0.12547429 286:0.073713586 406:0.12335037 578:0.40131235 720:0.13097784 960:0.30321017 1607:0.17021149 2205:0.5118736 3177:0.54580438 4507:0.27290219 #
-0.61395623101405172317157621364458 6:0.019937159 27:0.019350741 31:0.025329925 37:0.031444062 42:0.11928168 83:0.03443896 127:0.066094264 142:0.0086166598 162:0.035993244 190:0.056980081 202:0.16503957 286:0.074475288 323:0.056850906 386:0.052928429 408:0.039132856 411:0.049789339 480:0.048880257 500:0.068775021 506:0.037179198 555:0.076585822 594:0.063632675 663:0.062197074 673:0.067195281 782:0.075720288 834:0.066969693 923:0.44677126 1146:0.076086208 1191:0.5542227 1225:0.059279677 1302:0.094811738 1305:0.060443446 1379:0.070145406 1544:0.087077379 1936:0.089480147 2451:0.31556693 2796:0.1145037 2833:0.20080972 6242:0.1545693 6574:0.28386003 7639:0.29435158 #

等等……

预测文件:

1.0142989
1.3699419
1.4742762
0.52224801
0.41167112
1.3597693
0.91790572
1.1846312
1.5038173
-1.7641716
-1.4615855
-0.75832723

等等……

【问题讨论】:

    标签: machine-learning svm prediction svmlight


    【解决方案1】:

    在您的培训文件中,您是否提供了已知课程(+1、-1)?即

    -1 1:0.43 3:0.12 9284:0.2 # abcdef
    

    您能否提供此文件的摘录以及您运行的命令?

    预测文件根据您训练的模型保存每个数据点的值。您可以认为低于 0 的值将数据点分类为 -1 类别,高于 0 的值分类为 +1 类别。

    当您在训练集上运行分类时,您将看到模型在哪里工作以及在哪里失败。

    【讨论】:

      猜你喜欢
      • 2014-02-09
      • 2016-10-01
      • 1970-01-01
      • 2014-01-16
      • 2012-11-25
      • 2014-06-24
      • 2019-08-30
      • 2014-09-25
      • 2016-04-06
      相关资源
      最近更新 更多