Dimensionality Reduction in R
Matt Pickard
Owner, Pickard Predictives, LLC






Preserves global structure

Preserves local structure (keeps neighbors next to each other)

library(Rtsne)set.seed(1234) tsne <- Rtsne(attrition_df %>% select(-Attrition))tsne_df <- attrition_df %>% bind_cols(tsne_x = tsne$Y[,1], tsne_y = tsne$Y[,2])tsne_df %>% ggplot(aes(x = tsne_x, y = tsne_y, color = Attrition)) + geom_point(alpha = 0.5)

Dimensionality Reduction in R