【发布时间】:2015-12-05 10:43:24
【问题描述】:
我在 matlab 中训练了 SVM,然后我将模型转移到 OpenCV 以检测汽车的后部。这是代码。
pos_mat = matfile('posfeat.mat'); % positive samples
neg_mat = matfile('negfeat.mat'); % negative samples
posRow = pos_mat.bigmat; % get positve samples
negRow = neg_mat.bigmatneg; % get negative samples
group = ones(135,1); % get labels
group(70:135) = -1;
t = 70;
for i =1:1:66
posRow(t,:) = (negRow(i,:));
t = t+1;
end
xdata = posRow;
SVMModel = fitcsvm(xdata,group);
beta = (SVMModel.Beta)';
这是输出。
现在我想计算 SVM 分类器的 Precision、Recall 和 Accuracy。这个post 非常有用,但它只提供与精度、召回率、准确性相关的概念。有人可以帮我计算 SVM 分类器的精度、召回率、准确率吗?你可以找到 posfeat 和 negfeat here。
【问题讨论】: