0
$\begingroup$

I'm doing lasso and ridge regression in R with the package chemometrics. With ridgeCV it is easy to extract the SEP and MSEP values by modell.ridge$RMSEP and model.ridge$SEP. But how can I do this with lassoCV? model.lasso$SEP works, but there is no RMSE or MSE entry in the list. However the function provides a plot with MSEP and SEP in the legend. Therefore it must be possible to extract both values! But how?

  • SEP = standard error of the predictions;
  • MSEP = mean squared error of the predictions;
  • RMSEP = root mean square error of the predictions = root(MSEP)
$\endgroup$
2
  • 2
    $\begingroup$ What do SEP, MSEP and RMSEP stand for? $\endgroup$ Mar 17 at 18:21
  • $\begingroup$ Please provide the definitions of those abbreviations by editing the question, as comments are easy to overlook and can get deleted. $\endgroup$
    – EdM
    Mar 17 at 20:09

1 Answer 1

0
$\begingroup$

After doing lassoCV

model.lasso <- lassoCV(y ~ x, ...) 

one can extract the MSE values by model.lasso$cv[model.lasso$ind] and therefore calculate the RMSE too sqrt(model.lasso$cv[model.lasso$ind]).

Based on the documentation cv extracts the MSEP values at each value of fraction and ind is the index of fraction with optimal choice for fraction.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.