setDCF: These functions allows to specify the Decision Cost Function...

View source: R/setDCF.R

DCFR Documentation

These functions allows to specify the Decision Cost Function and compute the result

Description

Decision cost function related functions. A decision cost function weights the costs of false alarms and misses, and uses a prior over the target an non-target classes to compute a total expected cost:

DCF = P_tar * C_miss * P_miss + (1-P_tar) * C_fa * P_fa

The cost parameters can be set using setDCF, and retrieved by getDCF. The effect of the cost function to minimum Bayes' decisions can be summarized in an ‘effective prior’, or equivalently in a ‘prior log odds’

prior.log.odds() = C_miss * P_tar / (C_fa * (1-P_tar))

The decision cost otself can be evalated using actDCF (for actual DCF based on Bayes decisions given the log likelihood ratio scores) and minDCF for the minimum ataainable DCF after optimal calibration of the scores.

Usage

setDCF(evaluation, prior=0.5, cfa=1, cmiss=1)
getDCF()
prior.log.odds(dcf.p = get("DCF.p", envir = .sretoolsEnv), prior = dcf.p$prior, 
    cfa = dcf.p$cfa, cmiss = dcf.p$cmiss)
actDCT(x, plo=prior.log.odds(), norm=TRUE)
minDCF(x, plo=prior.log.odds(), norm=TRUE)

Arguments

evaluation

A stirng indicating the evaluation campaign, “nist,” “nist10', “nist12” or “evalita”, defining the cost parameters, or empty to set parameters to prior.log.odds=0

prior

The prior P_tar for targets in the DCF

cfa, cmiss

The costs of false alarms and misses in the DCF

dcf.p

A list containing a DCF parameter set

x

A coc object, or a data frame of class cst or that can be coerced to one

plo

Thel prior log odds to use as the operating point

norm

Should the results be normalized to 1 for a classifier based on the prior only?

Details

setDCF knows a few Speaker Recognition Evaluation DCF parameter sets. By specifiying evaluation the whole cost function can be set immediately. Valid values are "nist" for pre-2010 cost parameters, "nist10" for SRE 2010, or "evalita" for EVALITA cost parameters. Please note that the evaluation "nist12" sets two operating points.

Alternatively one or more parameters prior, cfa or cmiss can be specified. By giving no arguments, the DCF is reset to cfa=cmiss=1 and prior=0.5, corresponding to log prior odds of 0.

The functions actDCF and minDCF compute the actual and minimum DCF for the currently set DCF parameters. Alternatively, a specific operating point can be set using lpo, this may be a vector of values. Please note that minDCF computes the ROC, so it is more efficient to pass a roc structure if that has already been computed.

prior.log.odds returns the prior log odds corresponding to the currently set DCF parameters.

Author(s)

David A. van Leeuwen

See Also

roc

Examples

data(ru.2009)
actDCF(ru.2009)

davidavdav/ROC documentation built on Sept. 8, 2023, 2:39 p.m.