⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compute_thres.m

📁 关于人脸识别的一个VC程序
💻 M
字号:
function [thr_add, thr_add_old] = compute_thres(resp, labels)

[resp, ind] = sort(resp);
labels      = labels(ind);

%now look for the point which cuts the label vector into 'pure' parts
num = size(labels,2);

err=zeros(num-1,1);

for cut=1:(num-1),
  err(cut) = (cut + sum(labels(1:cut)))/2 + ((num-cut) - sum(labels((cut+1):num)))/2;
end

best_ind = find(min(err) == err);

%plot(err);
thr_add = -mean((resp(best_ind) + resp(best_ind+1))/2);

best_ind = floor(mean(best_ind));

% choose thresh to the right!

thr_add_old = -(resp(best_ind)+resp(best_ind+1))/2;






⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -