R/logreg_model.R

Defines functions create_log_reg_model

create_log_reg_model <- function(data = dplyr::tibble(),
                                 recipe = recipes::recipe()) {
  logit_model <- parsnip::logistic_reg(mode = "classification") %>%
    parsnip::set_engine("glmnet")

  workflows::workflow() %>%
    workflows::add_recipe(recipe) %>%
    workflows::add_model(logit_model)

}
gouthaman87/titanicPrediction documentation built on Dec. 20, 2021, 12:45 p.m.