Description Usage Arguments Author(s) See Also Examples
View source: R/cutoffSensitivityPlot.R
Visualize the sensitivity of a chosen metric to the choice of the threshold (cutoff) value used to transform continuous predictions into class predictions.
1 2 3 | cutoffSensitivityPlot(predTest, depTest, metric = c("accuracy",
"expMisclassCost", "misclassCost"), costType = c("costRatio", "costMatrix",
"costVector"), costs = NULL, resolution = 1/50)
|
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%). |
Koen W. De Bock, kdebock@audencia.com
dynAccuracy
, misclassCost
, expMisclassCost
1 2 3 4 5 6 7 8 9 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.