Learn R Programming

kerntools (version 1.2.0)

Rec: Recall or Sensitivity or TPR

Description

`Rec()` computes the Recall, also known as Sensitivity or TPR (True Positive Rate), between the output of a classification model and the actual values of the target.

Usage

Rec(ct, multi.class = "macro")

Value

TPR (a single value).

Arguments

ct

Confusion Matrix.

multi.class

Should the results of each class be aggregated, and how? Options: "none", "macro", "micro". (Defaults: "macro").

Examples

Run this code
y <- c(rep("a",3),rep("b",2))
y_pred <- c(rep("a",2),rep("b",3))
ct <- table(y,y_pred)
Rec(ct)

Run the code above in your browser using DataLab