accuracy: Accuracy

View source: R/accuracy.R

accuracyR Documentation

Accuracy

Description

Compute Accuracy using confusion matrix. Accuracy the describes the fraction of correctly classified instances in the test set.

Usage

accuracy(confusion_matrix, r = NULL)

Arguments

confusion_matrix

Confusion matrix to be used.

r

Skew Ratio parameter, which is required to calculate skew-sensitive form of Accuracy, which is a class specific measure. In the case of symmetric misclassification cost (in absence of knowledge about costs), 'r' can represent the class ratio. In the event of 'r' representing the class ratio, it can be seen that a value of 'r' less than unity weighs the positive examples more than the negative ones and vice versa. Default to NULL, which calculates overall (class-insensitive) accuracy.

Value

integer value of Accuracy


nikitagusarov/performancer documentation built on Jan. 12, 2023, 12:19 a.m.