coordinate_descent_enet: The coordinate descent for the standard elastic net...

Description Usage Arguments Value

View source: R/FGSPCAUtils.R

Description

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.

Usage

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
)

Arguments

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, 100 (default)

condition_tol

the tolerance for the condition to stop, 1e-3 (default)

loss_return

whether to return loss or not, FALSE (default)

Value

β 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).


ipapercodes/FGSPCA documentation built on Dec. 20, 2021, 7:58 p.m.