Closed stephens999 closed 6 years ago
Thanks for pointing this out! I just updated the cross-validation module and its documentation (it now includes descriptions of cvmeans and cvsds). You'll need to reinstall L0Learn to get those updates.
If you're using L0 regularization alone, then the index of the optimal lambda can be found using OptimalIndex = which.min(fit$cvmeans)
and the optimal lambda can be then extracted using fit$lambda[OptimalIndex]
. For L0L2/L0L1, cvmeans is a list where cvmeans[[i]] is a sequence of cross-validation errors corresponding to fit$gamma[i]. So which.min(fit$cvmeans[[i]])
can be used to get the optimal index for the ith value of gamma.
I will add an example of cross-validation and how to extract the optimal parameters to the Wiki page soon.
Update: The Usage Wiki page now has an example showing how to use cross-validation using L0L2/L0L1 penalties.
thanks for this great package! I realize this is likely work in progress, but I could not work out what to do with the output of L0learn.cvfit from the current documentation. It seems to have some undocumented values (like cvmeans and cvsds) and I wasn't sure how to extract the "optimal" value of lambda. thanks for any help/pointers!