Discovering correlated predictors
Correlated predictor variables provide redundant information and can negatively impact the model fitting process. When two variables are highly correlated, their values change linearly with each other and hence provide the same information to your machine learning algorithms. This phenomenon is know as multicollinearity.
Before beginning the model fitting process, it's important to explore your dataset to uncover these relationships and remove them in your feature engineering steps.
In this exercise, you will explore the telecom_training
dataset by creating a correlation matrix of all the numeric predictor variables.
The telecom_training
data has been loaded into your session.
This exercise is part of the course
Modeling with tidymodels in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
telecom_training %>%
# Select numeric columns
___(___) %>%
# Calculate correlation matrix
___