Assume we have a simple linear regression model expressed as $Y= X \beta + e$.
We know that finding the regression coefficients $\beta$ using the LASSO method is performed by penalizing the Least Squares by the L1 norm penalty:
$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$$argmin_\beta~(Y - X\beta)^2 + \lambda ||\beta||_1$
The most known technique to find the parameter $\lambda$ is k-fold cross validation. So can anyone help me how can I apply in matlab the k-fold cross validation in order to find the values of $\lambda$?
Any help will be very appreciated!