Skip to contents

Specify that the pooled logistic regression outcome models should be fit using one of the classification type models in parsnip

Usage

parsnip_model(model_spec, save_path)

Arguments

model_spec

A parsnip model definition with mode = "classification".

save_path

Directory to save models. Set to NA if models should not be saved.

Value

An object of class te_parsnip_model inheriting from te_model_fitter which is used for dispatching methods for the fitting models.

See also

Other model_fitter: stats_glm_logit(), te_model_fitter-class

Examples

if (FALSE) { # \dontrun{
if (
  requireNamespace("parsnip", quietly = TRUE) &&
    requireNamespace("rpart", quietly = TRUE)
) {
  # Use a decision tree model fitted with the rpart package
  parsnip_model(
    model_spec = parsnip::decision_tree(tree_depth = 30) |>
      set_mode("classification") |>
      set_engine("rpart"),
    save_path = tempdir()
  )
}
} # }