cutoffSensitivityPlot {CustomerScoringMetrics} | R Documentation |
Plot a sensitivity plot for cutoff values
Description
Visualize the sensitivity of a chosen metric to the choice of the threshold (cutoff) value used to transform continuous predictions into class predictions.
Usage
cutoffSensitivityPlot(predTest, depTest, metric = c("accuracy",
"expMisclassCost", "misclassCost"), costType = c("costRatio", "costMatrix",
"costVector"), costs = NULL, resolution = 1/50)
Arguments
predTest |
Vector with predictions (real-valued or discrete) |
depTest |
Vector with true class labels |
metric |
Which metric to assess. Should be one of the following values:
|
costType |
An argument that specifies how the cost information is provided.
This should be either |
costs |
see |
resolution |
Value for the determination of percentile intervals. Default 1/10 (10%). |
Author(s)
Koen W. De Bock, kdebock@audencia.com
See Also
dynAccuracy
, misclassCost
, expMisclassCost
Examples
## Load response modeling predictions
data("response")
## Apply cutoffSensitivityPlot function to visualize how the cutoff value influences
## accuracy.
cutoffSensitivityPlot(response$test[,2],response$test[,1],metric="accuracy")
## Same exercise, but in function of misclassification costs
costs <- runif(nrow(response$test), 1, 50)
cutoffSensitivityPlot(response$test[,2],response$test[,1],metric="misclassCost",
costType="costVector",costs=costs, resolution=1/10)