This method computes Cohen's \(\kappa\) of a confusion matrix.
Examples
# create a confusion matrix
conf_matrix <- matrix(1:9, nrow = 3, ncol = 3)
# evaluate Cohen's kappa of `conf_matrix`
cohen_kappa(conf_matrix)
#> [1] -0.04166667
This method computes Cohen's \(\kappa\) of a confusion matrix.
# create a confusion matrix
conf_matrix <- matrix(1:9, nrow = 3, ncol = 3)
# evaluate Cohen's kappa of `conf_matrix`
cohen_kappa(conf_matrix)
#> [1] -0.04166667