binaryCMAsHTML: Confusion matrix results in HTML

View source: R/binaryCMAsHTML.R

binaryCMAsHTMLR Documentation

Confusion matrix results in HTML

Description

Prints results from binaryCM() into a nice HTML table format.

Usage

binaryCMAsHTML(
  x,
  y,
  ref.description = NULL,
  digits = 4,
  seed = 20,
  num.boot = 1000,
  conf.level = 0.95,
  show.ci = TRUE
)

Arguments

x

vector of reference classes

y

vector of predicted classes

ref.description

description of classes

digits

number of digits to round p-values to

seed

random seed for bootstrap resampling

num.boot

number of bootstrap confidence intervals

conf.level

confidence level. Defaults to 95%.

show.ci

if TRUE (default), the confidence intervals are shown.

Value

A character string that can be parsed as HTML code to display a nice confusion matrix summary.

Author(s)

Samuel Leung, Derek Chiu

See Also

Other confusion matrix functions: binaryCM(), multiClassCM()

Examples

# 95% CI from 5 bootstraped samples
library(htmlTable)
set.seed(547)
n <- 20
x <- rbinom(n, size = 1, prob = 0.6)
y <- rbinom(n, size = 1, prob = 0.4)
results <- binaryCMAsHTML(x, y, "Test", num.boot = 1000)
htmlTable(results)

results.no.ci <- binaryCMAsHTML(x, y, "Test", num.boot = 1000, show.ci =
FALSE)
htmlTable(results.no.ci)

TalhoukLab/biostatUtil documentation built on April 14, 2025, 4:15 a.m.