costVsTh4binClassifier
Contents
Syntax
- [costMin, thBest, costVec, thVec, misclassifiedCount]=costVsTh4binClassifier(gt, logLike, opt, showPlot)
Description
costVsTh4binClassifier(gt, logLike, opt) returns the cost vector under various thresholds
- opt.fnCost: a vector of FN costs, while FP cost is fixed at 1.
Example
n=100;
gt=[ones(1,2*n), 2*ones(1,n)];
logLike=[randn(1,2*n)-1, randn(1,n)+1];
opt=costVsTh4binClassifier('defaultOpt');
[costMin, thBest, costVec, thVec, misclassifiedCount]=costVsTh4binClassifier(gt, logLike, opt, 1);