Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread Jin Li
Hi Ben, Martin and all, The function, glmnetcv, in the spm2 package was developed for the following main reasons: 1. The training and testing samples were generated using a stratified random sampling method instead of a simple random sampling method. By doing this, we hoped that it may be able to

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread varin sacha via R-help
Dear R-experts, I really thank you all a lot for your responses. So, here is the error (and warning) messages at the end of my R code. Many thanks for your help. Error in UseMethod("predict") :   no applicable method for 'predict' applied to an object of class "c('matrix', 'array', 'double',

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread Ben Bolker
For what it's worth it looks like spm2 is specifically for *spatial* predictive modeling; presumably its version of CV is doing something spatially aware. I agree that glmnet is old and reliable. One might want to use a tidymodels wrapper to create pipelines where you can more easily swit

Re: [R] Technical Help Request for "Version Differences" (i.e., CYTOFKIT package)

2023-10-23 Thread Ivan Krylov
Dear Nader Habibzadeh, В Sat, 21 Oct 2023 15:11:23 +0330 Nader Habibzadeh пишет: > I came across the same issue you have demonstrated in "r-help" but > with the shiny package installation. Do any of the replies to Murat's question, e.g. [1], help? If you have a different problem, let us know w

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread Martin Maechler
> Jin Li > on Mon, 23 Oct 2023 15:42:14 +1100 writes: > If you are interested in other validation methods (e.g., LOO or n-fold) > with more predictive accuracy measures, the function, glmnetcv, in the spm2 > package can be directly used, and some reproducible examples are