Computes case weights adding to one for response variables of these types:
numeric binomial (1 and 0).
logical (TRUE and FALSE): converted to numeric internally.
categorical (character or factor)
Values NA, Inf, -Inf, and NaN are invalid for numeric and logical variables and will result in errors. For categorical variables, these are converted to their respective categories ("NA", "Inf", "-Inf", and "NaN") with their assigned case weights.
All returned weights sum to one.
Arguments
- x
(required, integer, character, or factor vector) Values of a binomial, categorical, or factor variable. Default: NULL
- ...
(optional) Internal args (e.g.
function_nameforvalidate_arg_function_name, a precomputed correlation matrixm, or cross-validation args forpreference_order).
See also
Other modelling_tools:
model_formula(),
score_auc(),
score_cramer(),
score_r2()
