Visualisering och tolkning av PCA-resultat

Oövervakad inlärning i R

Hank Roark

Senior Data Scientist at Boeing

Biplot

biplot

Oövervakad inlärning i R

Scree plot

scree plot

Oövervakad inlärning i R

Biplot i R

# Creating a biplot
pr.iris <- prcomp(x = iris[-5], 
                  scale = FALSE, 
                  center = TRUE)
biplot(pr.iris)

biplot

Oövervakad inlärning i R

Scree plot i R

# Getting proportion of variance for a scree plot
pr.var <- pr.iris$sdev^2
pve <- pr.var / sum(pr.var)

# Plot variance explained for each principal component plot(pve, xlab = "Principal Component", ylab = "Proportion of Variance Explained", ylim = c(0, 1), type = "b")
Oövervakad inlärning i R

scree plot

Oövervakad inlärning i R

Nu kör vi en övning!

Oövervakad inlärning i R

Preparing Video For Download...