cost4binClassifier
Contents
Syntax
- [costMin, thBest, costVec, thVec, misclassifiedCount]=cost4binClassifier(gt, logLike, opt, showPlot)
Description
cost4binClassifier(gt, logLike, opt) returns the cost vector under various thresholds
- opt.costPair: 2-element vector of false-positive and false-negative cost
Example
n=100;
gt=[ones(1,2*n), 2*ones(1,n)];
logLike=[randn(1,2*n)-1, randn(1,n)+1];
opt=cost4binClassifier('defaultOpt');
opt.costPair=[1, 3];
[costMin, thBest, costVec, thVec, misclassifiedCount]=cost4binClassifier(gt, logLike, opt, 1);