View source: R/PerfsBinClassif.R
PerfsBinClassif | R Documentation |
Computes various performance measures for binary classification tasks : true positive rate, true negative rate, accuracy, balanced accuracy, area under curve (AUC).
PerfsBinClassif(pred, actual)
pred |
numerical vector of predicted values |
actual |
numerical vector of actual values |
A numeric vector of performance measures.
data(titanic)
titanic <- titanic[complete.cases(titanic),]
model <- partykit::ctree(Survived ~ Sex + Pclass, data = titanic)
pred <- predict(model, type = "prob")[,"Yes"]
PerfsBinClassif(pred, titanic$Survived)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.