function [exampleF1] = exampleF(pre_labels,test_target,beta )
%UNTITLED 此处显示有关此函数的摘要
%   此处显示详细说明
    if nargin<3
        beta = 1;
    end
    n=size(test_target,2);
    pre_labels(pre_labels>0) = 1;
    pre_labels(pre_labels<=0) = 0;
    test_target(test_target>0) = 1;
    test_target(test_target<=0) = 0;   
    TP = pre_labels&test_target; % true positive
    FP = pre_labels&(~test_target); % false positive
    FN = (~pre_labels)&test_target; % false negative
    for i=1:n
        TP = sum(TP,1);
        FP = sum(FP,1);
        FN = sum(FN,1);
        if TP(i) + FP(i) + FN(i) == 0
          exampleF(i)= 0;
        else
           beta2 = beta^2;
          exampleF(i) = ((beta2 + 1) * TP(i)) / ((beta2 + 1) * TP(i) + beta2 * FN(i) + FP(i));
        end
    end
    exampleF1=mean(exampleF);
end



