R 中的无监督学习
Hank Roark
Senior Data Scientist at Boeing



# 使用不同方法拟合层次聚类模型
hclust.complete <- hclust(d, method = "complete")
hclust.average <- hclust(d, method = "average")
hclust.single <- hclust(d, method = "single")
# 检查是否需要缩放
colMeans(x)
-0.1337828 0.0594019
apply(x, 2, sd)
1.974376 2.112357
# 生成列均值为 0、标准差为 1 的新矩阵
scaled_x <- scale(x)
colMeans(scaled_x)
2.775558e-17 3.330669e-17
apply(scaled_x, 2, sd)
1 1
R 中的无监督学习