Basis van feature-extractie - hoofdcomponenten

Dimensionality Reduction in R

Matt Pickard

Owner, Pickard Predictives, LLC

Herhaling feature-extractie

Enkele van de zes features gecombineerd tot vier features

Dimensionality Reduction in R

Herhaling feature-extractie

Moestuin

Salade-recept

  • 1 krop sla
  • 3 wortels
  • 2 tomaten
  • 1 komkommer

Gebruik niet de hele plant, alleen de beste delen

1 Beeldbron: Daderot, CC0, via Wikimedia Commons
Dimensionality Reduction in R

PCA-plot

PCA-plot met twee hoofdcomponenten en de features die daarop laden

Dimensionality Reduction in R

Hoofdcomponent 1

PCA-plot - eerste hoofdcomponent

Dimensionality Reduction in R

PC1: featurevectoren

PCA-plot - features die laden op de eerste hoofdcomponent

Dimensionality Reduction in R

PC1: naam

PCA-plot - de eerste hoofdcomponent benoemen: duur

Dimensionality Reduction in R

Hoofdcomponent 2

PCA-plot - tweede hoofdcomponent

Dimensionality Reduction in R

PC2: featurevectoren

PCA-plot - features die laden op de tweede hoofdcomponent

Dimensionality Reduction in R

PC2: naam

PCA-plot - de tweede hoofdcomponent benoemen: prestatie

Dimensionality Reduction in R

Code voor een PCA-plot

library(ggfortify)

pca_res <- prcomp(attrition_df %>% select(-Attrition), scale. = TRUE)
autoplot(pca_res,
data = attrition_df,
colour = "Attrition",
alpha = 0.7,
loadings = TRUE,
loadings.label = TRUE,
loadings.colour = "black",
loadings.label.colour = "black",
loadings.label.repel = TRUE)
Dimensionality Reduction in R

Laten we oefenen!

Dimensionality Reduction in R

Preparing Video For Download...