Get startedGet started for free

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.

This exercise is part of the course

Modeling with tidymodels in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Train a logistic regression model
logistic_fit <- ___ %>% 
  last_fit(___, 
           split = ___)
Edit and Run Code