Description Usage Arguments Value
The objective function of the standard elastic net regression problem is
1/(2n) \| Y-Xβ\|_2^2 + λ (α \|β\|_1 + (1-α )/2\|β\|_2^2) .
It is the standard version of the elastic net problem.
1 2 3 4 5 6 7 8 9 | coordinate_descent_enet(
x,
y,
lambda,
alpha,
max.steps = 100,
condition_tol = 0.001,
loss_return = FALSE
)
|
x |
the data matrix X_{n\times p} |
y |
the response vector Y_{n \times 1} |
lambda |
the λ in the elastic net loss function |
alpha |
the α in the elastic net loss function |
max.steps |
maximum steps, the maximum number of steps for the updating, |
condition_tol |
the tolerance for the condition to stop, |
loss_return |
whether to return loss or not, |
β the solution β or a list
a list of β, a sequence of the objective values during the CD process,
a sequence of the loss values, a sequence of the penalty values,
list(beta=beta, obj=obj, loss=loss, pen=pen)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.