accuracy: Average classification accuracy

Description Usage Arguments Value Author(s) See Also Examples

View source: R/accuracy.R

Description

Computes average classification accuracy.

Usage

1
accuracy( pred, actual, cutoff = NULL, reference = NULL )

Arguments

pred

a numerical vector of estimated values.

actual

a numerical vector of actual values.

cutoff

cutoff value for the case that pred is vector of probabilites.

reference

a factor of classes to be used as the true results.

.

Value

The computed average classification accuracy (numeric value).

Author(s)

Reza Mohammadi a.mohammadi@uva.nl and Kevin Burke kevin.burke@ul.ie

See Also

conf.mat, mse, mae

Examples

1
2
3
4
pred   = c( "no", "yes", "yes", "no", "no", "yes", "no", "no" )
actual = c( "yes", "no", "yes", "no", "no", "no", "yes", "yes" )

accuracy( pred, actual )

liver documentation built on Oct. 27, 2021, 5:06 p.m.