Efficient Way to Choose The Regularization Parameter

1k Views Asked by At

In the regularization problem, for example, LASSO, the regularization parameter, \lambda, is determined by cross validation (CV).

When writing the code in R, I usually generate a sequence of values of \lambda. Then, for each one, I conduct the CV. The whole process is coded in the way of for-loop.

Since the for loop is not efficient, is there any better way to realize the idea of choosing regularization parameter in code?

0

There are 0 best solutions below