Reputation: 3538
I'm trying to use tidymodels to do exercise 6.2 in Applied Predictive Modeling and need to specify a PLS model. I tried using the code from this post, but I keep getting errors.
library (tidymodels)
library(modpls)
pls_spec <- plsmod::pls(num_comp = tune()) %>%
set_mode("regression") %>%
set_engine("mixOmics")
My Lasso spec works fine:
lasso_spec <- linear_reg(penalty = 0.1, mixture = 1) %>%
set_engine("glmnet")
Do I use glmnet for the PLS spec too?
Upvotes: 1
Views: 182
Reputation: 3538
Some additional research yielded my answer on the tidymodels site: https://www.tidymodels.org/find/parsnip/
Upvotes: 1