Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

accuracy

Accuracy


Description

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

Usage

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

Examples

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

Metrics

Evaluation Metrics for Machine Learning

v0.1.4
BSD_3_clause + file LICENSE
Authors
Ben Hamner [aut, cph], Michael Frasco [aut, cre], Erin LeDell [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.