Not all modeling engines can incorporate case weights into their calculations. This function can determine whether they can be used.
Arguments
- spec
A parsnip model specification.
Examples
case_weights_allowed(linear_reg())
#> [1] TRUE
case_weights_allowed(linear_reg(engine = "keras"))
#> [1] FALSE