我已经在matlab中训练了支持向量机,然后我将我的模型转移到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分类器的准确率、召回率和准确率。这个post非常有用,但它只提供了与精确度、召回率、准确度相关的概念。有人能帮我计算支持向量机分类器的准确率,召回率,准确率吗?你可以找到posfeat和negfeat here。
发布于 2016-08-21 01:44:38
根据
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
此工具中包含的评估函数包括:
precision
Precision = true_positive / (true_positive + false_positive)
recall
Recall = true_positive / (true_positive + false_negative)
fscore
F-score = 2 * Precision * Recall / (Precision + Recall)
bac
BAC (Balanced ACcuracy) = (Sensitivity + Specificity) / 2,
where Sensitivity = true_positive / (true_positive + false_negative)
and Specificity = true_negative / (true_negative + false_positive)
auc
AUC (Area Under Curve) is the area under the ROC curve.注意:此工具仅适用于标签为{1,-1}的二进制类C-SVM。不支持多类、回归和概率估计。注意:当使用准确度作为评估标准时,交叉验证精度可能与标准LIBSVM的交叉验证精度不同。原因是LIBSVM在内部对同一类中的数据进行分组,而此工具不会。
https://stackoverflow.com/questions/32479960
复制相似问题