getThresholdSummary {PatientLevelPrediction} | R Documentation |
Calculate all measures for sparse ROC
Description
Calculate all measures for sparse ROC
Usage
getThresholdSummary(
prediction,
predictionType = "binary",
typeColumn = "evaluation"
)
Arguments
prediction |
A prediction object |
predictionType |
The type of prediction (binary or survival) |
typeColumn |
A column that is used to stratify the results |
Details
Calculates the TP, FP, TN, FN, TPR, FPR, accuracy, PPF, FOR and Fmeasure from a prediction object
Value
A data.frame with TP, FP, TN, FN, TPR, FPR, accuracy, PPF, FOR and Fmeasure
Examples
prediction <- data.frame(rowId = 1:100,
outcomeCount = stats::rbinom(1:100, 1, prob=0.5),
value = runif(100),
evaluation = rep("Train", 100))
summary <- getThresholdSummary(prediction)
str(summary)
[Package PatientLevelPrediction version 6.4.1 Index]