我已经开始使用LibSVM训练两个类了。
训练数据的安排如下:
训练两个班级的数据(每个班级有7128个图像):( 14256 X 2304)
培训两个班级的标签(每个班级有7128张图片(1和-1)):( 14256 X 1)
model = svmtrain(training_label, training_data, '-s 0 -t 0 -c 1 -g 0.1')
我收到了这个输出:
..
WARNING: using -h 0 may be faster
*..*
optimization finished, #iter = 4625
nu = 0.024285
obj = -173.499920, rho = 13.995985
nSV = 577, nBSV = 189
Total nSV = 577
model =
Parameters: [5x1 double]
nr_class: 2
totalSV: 577
rho: 13.9960
Label: [2x1 double]
sv_indices: [577x1 double]
ProbA: []
ProbB: []
nSV: [2x1 double]
sv_coef: [577x1 double]
SVs: [577x2304 double]
特征向量:
figure
pos = find(training_label == 1);
neg = find(training_label == -1);
plot(training_data(pos,1), training_data(pos,2), 'ko', 'MarkerFaceColor', 'b'); hold on;
plot(training_data(neg,1), training_data(neg,2), 'ko', 'MarkerFaceColor', 'g')
我的问题是如何检查培训是否正确完成?什么是输出显示?