16.6 Partial Least Squares (PLS)

  • Supervised: basically PCA, but makes use of the outcome variable
  • Tries to maximise variation in predictors, while also maximising the relationship between these components and the outcome
bean_rec_trained %>%
  step_pls(all_numeric_predictors(), outcome = "class", num_comp = 4) %>%
  plot_validation_results() + 
  ggtitle("Partial Least Squares")

The first two components are very similar to the first two PCA components, but the remaining components are different. Let’s look at the top features for each component:

bean_rec_trained %>%
  step_pls(all_numeric_predictors(), outcome = "class", num_comp = 4) %>%
  prep() %>% 
  plot_top_loadings(component_number <= 4, n = 5, type = "pls") + 
  scale_fill_brewer(palette = "Paired") +
  ggtitle("Partial Least Squares")

Solidity and roundness are the features behind PLS3.