我下载了适用于 linux 操作系统的 SVM-Light。运行命令。它产生 2 个可执行的 svm_learn 和 svm_classify。train.dat
使用它,我尝试test.dat
使用以下代码执行示例文件(它包含一个文件)
./svm_learn example1/train.dat example1/model.txt
./svm_classify example1/test.dat example1/model.txt example1/predictions.txt
之后我得到 2 个文本文件模型和预测。我是 svm 的新手。为什么test.dat
和train.dat
在示例文件中的格式相同?
test.dat +1 6:0.0342598670723747 26:0.148286149621374 27:0.0570037235976456
train.dat 1 6:0.0198403253586671 15:0.0339873732306071 29:0.0360280968798065
输出像
> Scanning examples...done
Reading examples into memory...100..200..300..400..500..600..700..800..900..1000..1100..1200..1300..1400..1500..1600..1700..1800..1900..2000..OK. (2000 examples read)
Setting default regularization parameter C=1.0000
Optimizing........................................................................................................................................................................................................................................................................................................................................................................................................................................done. (425 iterations)
Optimization finished (5 misclassified, maxdiff=0.00085).
Runtime in cpu-seconds: 0.07
Number of SV: 878 (including 117 at upper bound)
L1 loss: loss=35.67674
Norm of weight vector: |w|=19.55576
Norm of longest example vector: |x|=1.00000
Estimated VCdim of classifier: VCdim<=383.42790
Computing XiAlpha-estimates...done
Runtime for XiAlpha-estimates in cpu-seconds: 0.00
XiAlpha-estimate of the error: error<=5.85% (rho=1.00,depth=0)
XiAlpha-estimate of the recall: recall=>95.40% (rho=1.00,depth=0)
XiAlpha-estimate of the precision: precision=>93.07% (rho=1.00,depth=0)
Number of kernel evaluations: 45954
Writing model file...done
train.dat
是训练文件,所以它在执行前被标记,那么为什么test.dat
在执行前被标记?你能解释一下输出,尤其是条款吗precision,recall,error