confusion_matrix: Plot a confusion matrix for a given prediction set, and...

Description Usage Arguments Value

View source: R/evaluation_stage.r

Description

Plot a confusion matrix for a given prediction set, and return the table.

Usage

1
2
3
confusion_matrix(dataframe, cutoff = 0.5, plot.it = TRUE,
  xlab = c("dep_var = 0", "dep_var = 1"), ylab = c("score = 0",
  "score = 1"), title = NULL)

Arguments

dataframe

data.frame. Must contain score and dep_var columns. The confusion matrix will be calculated for these values. The mentioned columns must both be numeric.

cutoff

numeric. The cutoff at which to assign numbers greater a 1 for prediction purposes, and 0 otherwise. The default is 0.5.

plot.it

logical. Whether or not to plot the confusion matrix as a four fold diagram. The default is TRUE.

xlab

character. The labels for the rows (dep_var). The default is c("dep_var = 0", "dep_var = 1").

ylab

character. The labels for the rows (score). The default is c("score = 0", "score = 1").

title

character. The title for the fourfoldplot, if it is graphed.

Value

a table. The confusion matrix table.


robertzk/syberiaStages documentation built on May 27, 2019, 11:38 a.m.