You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in dplyr::select(all_of(features)) %>% as.matrix(), since there is no "features" in your data, I cannot repeate your compution. Is the data in github is not the one you used in your book?
Thanks and regards,
Mike
The text was updated successfully, but these errors were encountered:
In 5.1.3 Illustration, I try to use your code and data to compute Lasso as you did in your book:
library(glmnet)
y_penalized <- data_ml$R1M_Usd # Dependent variable
x_penalized <- data_ml %>% # Predictors
dplyr::select(all_of(features)) %>% as.matrix()
fit_lasso <- glmnet(x_penalized, y_penalized, alpha = 1) # Model alpha = 1: LASSO
in dplyr::select(all_of(features)) %>% as.matrix(), since there is no "features" in your data, I cannot repeate your compution. Is the data in github is not the one you used in your book?
Thanks and regards,
Mike
The text was updated successfully, but these errors were encountered: