Complete modeling workflow
In this exercise, you will use the last_fit()
function to train a logistic regression model and evaluate its performance on the test data by assessing the ROC curve and the area under the ROC curve.
Similar to previous exercises, you will predict canceled_service
in the telecom_df
data, but with an additional predictor variable to see if you can improve model performance.
The telecom_df
tibble, telecom_split
, and logistic_model
objects from the previous exercises have been loaded into your workspace. The telecom_split
object contains the instructions for randomly splitting the telecom_df
tibble into training and test sets. The logistic_model
object is a parsnip
specification of a logistic regression model.
Este exercício faz parte do curso
Modeling with tidymodels in R
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Train a logistic regression model
logistic_fit <- ___ %>%
last_fit(___,
split = ___)