measure_wkappa: Weighted Cohen's kappa

Description Usage Arguments Value See Also Examples

View source: R/measure_wkappa.R

Description

This function is based on function 'measureWKAPPA' from 'mlr' package.

Usage

1
measure_wkappa(truth = NULL, response = NULL, conf_mat = NULL)

Arguments

truth

a vector with true (reference) values.

response

a vector with response (predicted) values.

conf_mat

a table similar to (table(truth, response, useNA = "no")).

Value

[!!!]

See Also

Other measures_: measure_kappa()

Examples

1
2
3
4
5
6
7
truth <- rep(1:3, times = 50)
prediction <- rep(3:1, each = 50)

measure_wkappa(truth, prediction)

square_matrix <- table(truth, prediction)
measure_wkappa(conf_mat = square_matrix)

GegznaV/multiROC documentation built on Sept. 15, 2020, 10:33 a.m.