ConfusionMatrix: 'ConfusionMatrix'

View source: R/confusion.R

ConfusionMatrixR Documentation

ConfusionMatrix

Description

Produces a confusion matrix for a trained model or data.frame showing the proportion of observed values that take the same values as the predicted values. Where the outcome variable in the model is not a factor and not a count, observed and predicted values are assigned to buckets.

Usage

ConfusionMatrix(
  obj,
  subset = obj$subset,
  weights = obj$weights,
  decimals = NULL
)

Arguments

obj

A model with an outcome variable or a data.frame where the first column is the outcome and the second column is the prediction.

subset

An optional vector specifying a subset of observations to be used or the name of a column if obj is a data.frame.

weights

An optional vector of sampling weights or the name of a column if obj is a data.frame.

decimals

The number of decimal places for the values.


Displayr/flipRegression documentation built on March 2, 2024, 3:51 a.m.