Why calculating MSE in lasso regression gives different outputs?
问题 I am trying to run different regression models on the Prostate cancer data from the lasso2 package. When I use Lasso, I saw two different methods to calculate the mean square error. But they do give me quite different results, so I would want to know if I'm doing anything wrong or if it just means that one method is better than the other ? # Needs the following R packages. library(lasso2) library(glmnet) # Gets the prostate cancer dataset data(Prostate) # Defines the Mean Square Error