qpPRscoreThreshold {qpgraph}R Documentation

Calculation of scores thresholds attaining nominal precision or recall levels

Description

Calculates the score threshold at a given precision or recall level from a given precision-recall curve.

Usage

qpPRscoreThreshold(preRecFun, level, recall.level=TRUE, max.score=9999999)

Arguments

preRecFun precision-recall function (output from qpPrecisionRecall).
level recall or precision level.
recall.level logical; if TRUE then it is assumed that the value given in the level parameter corresponds to a desired level of recall; if FALSE then it is assumed a desired level of precision.
max.score maximum score given by the method that produced the precision-recall function to an association.

Value

The score threshold at which a given level of precision or recall is attained by the given precision-recall function. For levels that do not form part of the given function their score is calculated by linear interpolation and for this reason is important to carefully specify a proper value for the max.score parameter.

Author(s)

R. Castelo and A. Roverato

References

Fawcett, T. An introduction to ROC analysis. Pattern Recogn. Lett., 27:861-874, 2006.

See Also

qpPrecisionRecall qpGraph

Examples

nVar <- 50 # number of variables
maxCon <- 5  # maximum connectivity per variable
nObs <- 30 # number of observations to simulate

I <- qpRndGraph(n.vtx=nVar, n.bd=maxCon)
K <- qpI2K(I)

X <- qpSampleMvnorm(K, nObs)

nrr.estimates <- qpNrr(X, q=1, verbose=FALSE)

nrr.prerec <- qpPrecisionRecall(nrr.estimates, K!=0, decreasing=FALSE, recallSteps=seq(0,1,0.1))

qpPRscoreThreshold(nrr.prerec, level=0.5, recall.level=TRUE, max.score=0)

qpPRscoreThreshold(nrr.prerec, level=0.5, recall.level=FALSE, max.score=0)

[Package qpgraph version 1.0.0 Index]