Fitting a logistic regression model
In addition to regression models, the parsnip package also provides a general interface to classification models in R.
In this exercise, you will define a parsnip logistic regression object and train your model to predict canceled_service using avg_call_mins, avg_intl_mins, and monthly_charges as predictor variables from the telecom_df data.
The telecom_training and telecom_test tibbles that you created in the previous lesson have been loaded into this session.
Este exercício faz parte do curso
Modeling with tidymodels in R
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Specify a logistic regression model
logistic_model <- ___ %>%
# Set the engine
___ %>%
# Set the mode
___
# Print the model specification
logistic_model