t-分布随机邻域嵌入(t-SNE)

R 中的降维

Matt Pickard

Owner, Pickard Predictives, LLC

t-SNE 与 PCA 对比表

R 中的降维

t-SNE 与 PCA 对比表

R 中的降维

t-SNE 与 PCA 对比表

R 中的降维

t-SNE 与 PCA 对比表

R 中的降维

t-SNE 与 PCA 对比表

R 中的降维

绘制 PCA 与 t-SNE

PCA

PCA 图

保留全局结构

t-SNE

t-SNE 图

保留局部结构(让邻居彼此相邻)

R 中的降维

t-SNE 超参数

  • 困惑度(Perplexity):决定考虑的最近邻数量
  • 学习率(Learning rate):调整神经网络权重的速率
  • 迭代次数(Iterations):反向传播的迭代步数

t-SNE

t-SNE 图

R 中的降维

R 中的 t-SNE

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)
R 中的降维

t-SNE 图

t-SNE 图

R 中的降维

让我们来练习!

R 中的降维

Preparing Video For Download...