Learn R Programming

liver (version 1.5)

conf.mat: Confusion Matrix

Description

Create a Confusion Matrix.

Usage

conf.mat( pred, actual, cutoff = NULL, dnn = c( "Prediction", "Actual" ), ... )

Arguments

pred

a vector of estimated values.

actual

a vector of actual values.

cutoff

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

dnn

the names to be given to the dimensions in the result (the dimnames names).

options to be passed to table.

Value

the results of table on pred and actual.

Examples

Run this code
# NOT RUN {
pred   = c( "no", "yes", "yes", "no", "no", "yes", "no", "no" )
actual = c( "yes", "no", "yes", "no", "no", "no", "yes", "yes" )

conf.mat( pred, actual )
# }

Run the code above in your browser using DataLab