prox_sparse_func: proximal function of sparse component

Description Usage Arguments Details Value Examples

View source: R/prox_sparse_func.R

Description

proximal function of sparse component

Usage

1
prox_sparse_func(w1, y, A, b, L, lambda, AtA, Atb)

Arguments

w1

proximal vector

y

alternative coefficient vector

A

design matrix

b

target vector

L

learning rate

lambda

tuning parameter for sparse penalty

AtA

crossproduct of A

Atb

crossproduct of A and b

Details

This function is proximal function for sparse component. It returns the updated coefficient vector (matrix).

Value

value of proximal function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(100)
w1 <- stats::rnorm(10)
y <- stats::rnorm(10)
A <- matrix(stats::rnorm(200), 20, 10)
b <- stats::rnorm(20)
L <- 0.1
lambda <- 0.5
AtA <- t(A) %*% A
Atb <- t(A) %*% b
prox_sparse_func(w1, y, A, b, L, lambda, AtA, Atb)

kevinbai92/LSvarEstimate documentation built on May 8, 2020, 1:04 a.m.