Fits a binary classification model using the parsnip/workflows
framework. The user must specify the model engine explicitly.
Usage
tr_fit(
data,
outcome,
engine = c("logistic_reg", "random_forest", "boost_tree"),
predictors = NULL
)Arguments
- data
A data frame containing predictors and the outcome column.
- outcome
Character. Name of the binary outcome column (must be a factor or coercible to one, with the event of interest as the second level).
- engine
Character. Model engine to use. One of
"logistic_reg","random_forest", or"boost_tree".- predictors
Character vector of predictor column names. If
NULL(default), all columns exceptoutcomeare used.
