setup_lambda {iilasso} | R Documentation |
Set up a lambda sequence
setup_lambda(X, y, family = "gaussian", lambda.min.ratio = 1e-04, nlambda = 100)
X |
matrix of explanatory variables |
y |
vector of objective variable |
family |
family of regression: "gaussian" (default) or "binomial" |
lambda.min.ratio |
ratio of max lambda and min lambda |
nlambda |
the number of lambda (ignored if lambda is specified) |
lambda
X <- matrix(c(1,2,3,5,4,7,6,8,9,10), nrow=5, ncol=2) b <- matrix(c(-1,1), nrow=2, ncol=1) e <- matrix(c(0,-0.1,0.1,-0.1,0.1), nrow=5, ncol=1) y <- as.numeric(X %*% b + e) setup_lambda(X, y)