LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Modeling with tidymodels in R

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

logistic_model <- ___ %>% 
  # Specify the engine
  ___ %>% 
  # Specify the mode
  ___
Code bearbeiten und ausführen