shrinkage_lr: function for computing shrinkage for low-rank matrix

Description Usage Arguments Details Value Examples

View source: R/shrinkage_lr.R

Description

compute the soft-thresholded result for the low-rank estimator

Usage

1
shrinkage_lr(y, tau)

Arguments

y

An input vector, singular values vector of target matrix

tau

A float number, which stands for the threshold

Details

This function is to find the soft-thresholded singular value vector for low rank component. The input vector is derived by SVD.

Value

A thresholded singular value vector based on input matrix and threshold

Examples

1
2
3
4
5
set.seed(100)
M <- matrix(stats::rnorm(15), 5, 3)
y <- svd(M)$d
tau <- 0.5
shrinkage_lr(y, tau)   ### this vector is thresholded singular value vector.

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