まとめと振り返り

R による教師なし学習

Hank Roark

Senior Data Scientist at Boeing

ケーススタディのまとめ

  • 教師なし学習を用いたデータ分析プロセス全体
  • モデリングへの創造的なアプローチ
  • 現実世界の問題に取り組む準備
R による教師なし学習

クラスタリングの種類

k-means とデンドログラムの比較

R による教師なし学習

次元削減

PCA による射影

R による教師なし学習

モデル選択

# Initialize total within sum of squares error: wss
wss <- 0

# Look over 1 to 15 possible clusters
for (i in 1:15) {
  # Fit the model: km.out
  km.out <- kmeans(pokemon, centers = i, nstart = 20, iter.max = 50)
  # Save the within cluster sum of squares
  wss[i] <- km.out$tot.withinss
}

# Produce a scree plot
plot(1:15, wss, type = "b", 
     xlab = "Number of Clusters", 
     ylab = "Within groups sum of squares")
R による教師なし学習

PCA 結果の解釈

バイプロットとスクリープロット

R による教師なし学習

データスケーリングの重要性

スケーリング有無での特徴量重要度の比較

R による教師なし学習

コースの振り返り

pr.iris <- prcomp(x = iris[-5],
                  scale = FALSE,
                  center = TRUE)
summary(pr.iris)
Importance of components:
                          PC1     PC2    PC3     PC4
Standard deviation     2.0563 0.49262 0.2797 0.15439
Proportion of Variance 0.9246 0.05307 0.0171 0.00521
Cumulative Proportion  0.9246 0.97769 0.9948 1.00000
R による教師なし学習

デンドログラム

デンドログラム

R による教師なし学習

各アルゴリズムの長所と短所

各アルゴリズムのクラスタリング結果の違い

R による教師なし学習

コースの振り返り

# Repeat for components 1 and 3
plot(wisc.pr$x[, c(1, 3)], col = (diagnosis + 1), 
     xlab = "PC1", ylab = "PC3")

主成分

R による教師なし学習

スキルを磨きましょう!

R による教師なし学習

Preparing Video For Download...