solvebeta: The SPCA solver of beta for the elastic net problem

Description Usage Arguments Details Value References

View source: R/FGSPCAUtils.R

Description

The beta solver using the sparse PCA.

Usage

1
2
3
4
5
6
7
8
solvebeta(
  x,
  y,
  paras,
  max.steps,
  sparse = "penalty",
  eps = .Machine$double.eps
)

Arguments

x

the data matrix X_{n\times p}

y

the response vector Y_{n\times 1}

paras

the combination of parameters (λ_2, λ_1)\ lambda = paras[1] (which is lambda2) and lambda1 = paras[2] .

max.steps

100 (default) the maximum number of steps for the updating

sparse

sparse = c("penalty", "varnum")

eps

the tolerance of the stopping criterion for the termination

Details

The standard objective function of elastic net is

1/(2n) \| Y-Xβ\|_2^2 + λ (α \|β\|_1 + (1-α )/2\|β\|_2^2) .

But here we use the following objective function

1/(2n) \| Y-Xβ\|_2^2 + λ_1 \|β\|_1 + λ_2/2 \|β\|_2^2 .

Value

the solution β in each subproblem

References


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