accuracy: Accuracy

Description Usage Arguments See Also Examples

Description

accuracy is defined as the proportion of elements in actual that are equal to the corresponding element in predicted

Usage

1
accuracy(actual, predicted)

Arguments

actual

The ground truth vector, where elements of the vector can be any variable type.

predicted

The predicted vector, where elements of the vector represent a prediction for the corresponding value in actual.

See Also

ce

Examples

1
2
3
actual <- c('a', 'a', 'c', 'b', 'c')
predicted <- c('a', 'b', 'c', 'b', 'a')
accuracy(actual, predicted)

Example output

[1] 0.6

Metrics documentation built on May 1, 2019, 10:11 p.m.

Related to accuracy in Metrics...