summary_table: Create a summary table of model performance measures

Description Usage Arguments Value Examples

Description

This function returns a data frame of model accuracy, precision, recall, specificity and F1 value.

Usage

1
summary_table(truth, pred, name = NULL, gathered = TRUE)

Arguments

truth

A logical vector of true values

pred

A logical vector of values predicted by the model

name

An atomic character vector that will be appended to the output table, useful if you will be joining multipe summary tables

gathered

A boolean value. If TRUE, returns a 'tidy' dataframe with a column of values, and one row per measure type. If FALSE, returns a one-row data frame with one column for each measure type.

Value

A data frame with performance measure values

Examples

1
2
3
t <- c(TRUE, TRUE, FALSE, TRUE, FALSE)
p <- c(TRUE, FALSE, TRUE, TRUE, FALSE)
summary_table(t, p, gathered = FALSE)

mdlincoln/modeltests documentation built on May 22, 2019, 4:14 p.m.