Get startedGet started for free

Cross validation with logistic regression

Cross validation provides the ability to compare the performance profile of multiple model types. This is helpful in the early stages of modeling, when you are trying to determine which model type will perform best with your data.

In this exercise, you will perform cross validation on the loans_training data using logistic regression and compare the results to your decision tree model.

The loans_folds and loans_metrics objects from the previous exercise have been loaded into your session. Your feature engineering recipe from the previous section, loans_recipe, has also been loaded.

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.

logistic_model <- ___ %>% 
  # Specify the engine
  ___ %>% 
  # Specify the mode
  ___
Edit and Run Code