Description Usage Arguments Details Value
The elastic net loss function (not the standard version)
1 |
x |
the data matrix X_{n\times p} |
y |
the response vector Y_{n \times 1} |
beta |
β the estimation of β |
lambda1 |
the λ_1 in the loss function |
lambda2 |
the λ_2 in the loss function |
verbose |
whether to return a list, |
The standard version of the elastic net problem is defined as follows,
1/(2n) \| Y-Xβ\|_2^2 + λ (α \|β\|_1 + (1-α )/2\|β\|_2^2) .
The objective function of the elastic net we use in this function is defined as
1/(2n) \| Y-Xβ\|_2^2 + λ_1\|β\|_1 + λ_2\|β\|_2^2 .
It is not the standard version of the elastic net problem.
the value of the loss function or a list c(loss, pen, obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.