PerfsBinClassif {moreparty}R Documentation

Performance measures for binary classification tasks

Description

Computes various performance measures for binary classification tasks : true positive rate, true negative rate, accuracy, balanced accuracy, area under curve (AUC).

Usage

PerfsBinClassif(pred, actual)

Arguments

pred

numerical vector of predicted values

actual

numerical vector of actual values

Value

A numeric vector of performance measures.

Examples

  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)

[Package moreparty version 0.4 Index]