confusion_matrix: create confusion matrix

Description Usage Arguments Value Examples

View source: R/confusion_matrix.R

Description

create confusion matrix

Usage

1
confusion_matrix(test = NULL, gold = NULL)

Arguments

test

numeric 0/1 vector for the test file, indicating whether there was speech or not at a given timepoint

gold

numeric 0/1 vector for the gold standard file, indicating whether there was speech or not at a given timepoint

Value

a 2x2 matrix, where row labels refer to the gold standard and column lables to the tested/evaluated file

Examples

1
2
3
4
5
x1 <- system.file("noisemesSad_synthetic_speech.rttm", package = "avutils")
x2 <- system.file("synthetic_speech.eaf", package = "avutils")
edata <- evaluate_sad(test = x1, reference = x2, overlap_res = 100,
                      raw_results = TRUE, doplot = FALSE)
confusion_matrix(test = edata[, "test_speech"], gold = edata[, "ref_speech"])

gobbios/avutils documentation built on Feb. 19, 2020, 9:44 a.m.