Dimensionality Reduction in R
Matt Pickard
Owner, Pickard Predictives, LLC
healthcare_df %>% select(where(is.numeric)) %>%correlate() %>%shave() %>%rplot(print_cor = TRUE) +theme(axis.text.x = element_text(angle = 90, hjust = 1))






# create and prep the recipe corr_recipe <- recipe(Attrition ~ ., data = healthcare_df) %>%step_corr(all_numeric_predictors(), threshold = 0.7) %>%prep()# Apply the recipe to the data filtered_healthcare_df <- corr_recipe %>% bake(new_data = NULL)# Identify the features that were removed tidy(corr_recipe, number = 1)
Dimensionality Reduction in R