confusion.matrix: Create a confusion matrix

Description Usage Arguments Value

View source: R/confusion.matrix.R

Description

Create a confusion matrix from actual and predicted values

Usage

1
2
3
4
5
6
confusion.matrix(
  actual,
  predicted,
  actual.positive.fn = function(actual) {     ifelse(actual == 1, 1, 0) },
  predicted.positive.fn = function(predicted) {     ifelse(predicted == 1, 1, 0) }
)

Arguments

actual

A vector of values identifying the actual value (default 0,1 or use actual.positive.fn to convert)

predicted

A vector of values identifying the predicted value (default 0,1 or use predicted.positive.fn to convert)

actual.positive.fn

A function that takes values present in actual and converts them to 0,1

predicted.positive.fn

A function that takes values in predicted and converts them to 0,1

Value

A 2x2 matrix showing agreement between actual and predicted.


burrm/lolcat documentation built on Oct. 13, 2021, 11:35 p.m.