Skip to contents

Internal function to compute the Cramer's V of categorical observations versus categorical model predictions. Please read the help file of cor_cramer() for further details.

Usage

score_cramer(o = NULL, p = NULL, ...)

Arguments

o

(required; character vector) categorical observations. Default: NULL

p

(required; character vector) categorical predictions. Default: NULL

...

(optional) Internal args (e.g. function_name for validate_arg_function_name, a precomputed correlation matrix m, or cross-validation args for preference_order).

Value

numeric: Cramer's V

See also

Examples

score_cramer(
 o = c("a", "a", "b", "c", "c"),
 p = c("a", "b", "b", "c", "c")
 )
#> [1] 0.5