1 2 | elnet_coord(X, Y, a = 0.5, lambda = 1, tol = 10^(-8),
iterMax = 100, beta0 = rep(0, dim(X)[2]), GLMNET = FALSE)
|
X |
Covariate matrix |
Y |
Response vector |
a |
|
lambda |
Non-negative parameter |
tol |
Tolerance error |
iterMax |
Maximum iteration times |
beta0 |
Initial guess for coefficients |
GLMNET |
use Solve the elastic net regression problem. And the objective function to be minimized here is L = ||Y - X beta||_2^2 + lambda ((1 - a)||beta||_2^2 + a ||beta||_1). elnet_coord(matrix(rnorm(300), nrow = 50), runif(50), beta0 = rep(1,4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.