Skip to content

Not all modeling engines can incorporate case weights into their calculations. This function can determine whether they can be used.

Usage

case_weights_allowed(spec)

Arguments

spec

A parsnip model specification.

Value

A single logical.

Examples

case_weights_allowed(linear_reg())
#> [1] TRUE
case_weights_allowed(linear_reg(engine = "keras"))
#> [1] FALSE