Description Usage Arguments Value
Cross-validation to choose lambda in the constrained lasso procedure
1 2 | cv.glmnet.constr(fit, x, y, nfolds = 10, foldid = NULL, keep = F,
alpha = 1)
|
fit |
The result of a "glmnet.contsr" function call. |
x |
The matrix of features. |
y |
The response value. In the real-valued repsonse case, y should be centered. |
nfolds |
The number of CV folds. Default is 10. |
foldid |
Fold id for each observation. By default these are uniformly random. |
alpha |
Elastic net parameter. Default is 1 which gives the lasso. |
lambda The gride of lambda values
cvm The CV estimate of prediction error for each lambda.
yhat.preval The predicted values generated by each fold.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.