Learn R Programming

yardstick (version 0.0.1)

accuracy: Classification Metrics on Predited Classes

Description

General metrics for classification models

Usage

accuracy(data, ...)

# S3 method for data.frame accuracy(data, truth, estimate, na.rm = TRUE, ...)

# S3 method for table accuracy(data, ...)

# S3 method for matrix accuracy(data, ...)

Arguments

data

For the default functions, a factor containing the discrete measurements. For the table or matrix functions, a table or matrix object, respectively, where the true class results should be in the columns of the table.

...

Not currently used.

truth

The column identifier for the true class results (that is a factor). This should an unquoted column name although this argument is passed by expression and support quasiquotation (you can unquote column names or column positions).

estimate

The column identifier for the predicted class results (that is also factor). As with truth this can be specified different ways but the primary method is to use an unquoted variable name.

na.rm

A logical value indicating whether NA values should be stripped before the computation proceeds

See Also

conf_mat()