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.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Modeling with tidymodels in R
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Specify a logistic regression model
logistic_model <- ___ %>%
# Set the engine
___ %>%
# Set the mode
___
# Print the model specification
logistic_model