accuracy: Evaluate classification accuracy in precision and recall

View source: R/textmodel.R

accuracyR Documentation

Evaluate classification accuracy in precision and recall

Description

Evaluate classification accuracy in precision and recall

Usage

accuracy(x, y)

Arguments

x

vector of predicted classes

y

vector of true classes

Examples

class_pred <- c('US', 'GB', 'US', 'CN', 'JP', 'FR', 'CN') # prediction
class_true <- c('US', 'FR', 'US', 'CN', 'KP', 'EG', 'US') # true class
acc <- accuracy(class_pred, class_true)
print(acc)
summary(acc)

newsmap documentation built on May 29, 2024, 7:09 a.m.

Related to accuracy in newsmap...