The Data Being Used

How the data was split

The accuracy of the model, tested on the validation data

The financial impact of the model, given the following assumptions:

- The customer retention program consists of forgiving the anual fee of $100 (on average)

- The value of a customer is $2,300 per year (on average)

- Customer retention programs have a 30% success rate

Including Plots

rf$importance %>%
  data.frame() %>%
  rownames_to_column(var = "Feature") %>%
  ggplot(aes(x = fct_reorder(Feature, MeanDecreaseAccuracy), y = MeanDecreaseAccuracy)) + 
  geom_pointrange(aes(ymin=0, ymax = MeanDecreaseAccuracy), color = "cadetblue", size = .3) +
  theme_minimal() + 
  coord_flip() + 
  labs(x = "", title = "Variable Importance using MeanDecreasingAccuracy")
  

val$predicted_Attrition_FLag <- predict(rf , val)

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.