When I compute penalized regression on the data without normalizing using the glmnet package in R, the lambda values and RMSE generated in lasso, ridge, and elastic net are unreasonably large. The RMSE generated is in thousands. However, when I normalize the response variable, I see that the lambda, RMSE, and R^2 values are all within reasonable range, < 1. Are we supposed to normalize the response variable? I tried scaling the predictor variables, but it still generates large values for lambda, RMSE, and R^2. The response variable is numeric, number of shares of online articles and the values range from 1-840,000 with a mean of 3500.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.