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.
Diese Übung ist Teil des Kurses
Modeling with tidymodels in R
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Train a logistic regression model
logistic_fit <- ___ %>%
last_fit(___,
split = ___)