elnet_coord: Elastic Net

Description Usage Arguments Value Author(s)

View source: R/elnet_coord.R

Description

A function that implements the algorithm proposed by (Zou, Hui; Hastie, Trevor, 2015, JRRSB).

Usage

1
2
3
4
5
6
7
8
9
elnet_coord(
  y,
  X,
  beta0 = NA,
  alpha = 0,
  lambda = 0,
  niter = 10000,
  tol = 1e-05
)

Arguments

y

The constant vector

X

The regressor

beta0

The initial guess of the solution. If no input given, then it is set to a zero vector.

alpha

The elastic net parameter, alpha should be in [0,1]. More details to be found in Trevors paper.

lambda

Regularization parameter

niter

Maximum Number of Iteration

tol

Tolerance of the difference between two result from iteration

Value

The solution to the elastic net system according to given parameter.

Author(s)

Xiaohan Wang


xw547/hwpkg documentation built on Dec. 23, 2021, 7:14 p.m.