cv.glmnet.constr: CV for constrained lasso.

Description Usage Arguments Value

Description

Cross-validation to choose lambda in the constrained lasso procedure

Usage

1
2
cv.glmnet.constr(fit, x, y, nfolds = 10, foldid = NULL, keep = F,
  alpha = 1)

Arguments

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.

Value

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.


stephenbates19/logratiolasso documentation built on May 18, 2019, 4:52 p.m.