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

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

truth <- rep(1:3, times = 50) prediction <- rep(3:1, each = 50) measure_wkappa(truth, prediction)
#> [1] -0.02
square_matrix <- table(truth, prediction) measure_wkappa(conf_mat = square_matrix)
#> [1] -0.02