1. Learn
  2. /
  3. Courses
  4. /
  5. Modeling with tidymodels in R

Exercise

Creating recipe objects

In the previous chapter, you fit a logistic regression model using a subset of the predictor variables from the telecom_df data. This dataset contains information on customers of a telecommunications company and the goal is predict whether they will cancel their service.

In this exercise, you will use the recipes package to apply a log transformation to the avg_call_mins and avg_intl_mins variables in the telecommunications data. This will reduce the range of these variables and potentially make their distributions more symmetric, which may increase the accuracy of your logistic regression model.

Instructions 1/2

undefined XP
    1
    2
  • Create a recipe object, telecom_log_rec, that uses canceled_service as the outcome variable and all remaining columns in telecom_training as predictor variables.
  • Add a step to the recipe object that will log transform avg_call_mins and avg_intl_mins.