Afronding en review

Unsupervised learning in R

Hank Roark

Senior Data Scientist at Boeing

Case study: afronding

  • Volledig data-analyseproces met unsupervised learning
  • Creatieve aanpak voor modelleren
  • Klaar voor echte vraagstukken
Unsupervised learning in R

Soorten clustering

k-means vs. dendrogram

Unsupervised learning in R

Dimensiereductie

PCA-projectie

Unsupervised learning in R

Modelkeuze

# 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")
Unsupervised learning in R

PCA-resultaten interpreteren

biplot en screeplot

Unsupervised learning in R

Belang van schalen

vergelijking van geschaalde en ongeschaalde feature-importance

Unsupervised learning in R

Cursusreview

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
Unsupervised learning in R

Dendrogram

dendrogram

Unsupervised learning in R

Sterke en zwakke punten per algoritme

verschillende clusteringresultaten

Unsupervised learning in R

Cursusreview

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

hoofcomponenten

Unsupervised learning in R

Laten we oefenen!

Unsupervised learning in R

Preparing Video For Download...