Learn R Programming

InspectChangepoint (version 1.2)

sparse.svd: Computing the sparse leading left singular vector of a matrix

Description

Estimating the sparse left leading singular vector by first computing a maximiser Mhat of the convex problem $$<Z, M> - \lambda |M|_1$$ subject to the Schatten norm constraint |M|_schatten <= 1 using alternating direction method of multipliers (ADMM). Then the leading left singular vector of Mhat is returned.

Usage

sparse.svd(Z, lambda, schatten = c(1, 2), max.iter = 1000, tolerance = 1e-05)

Arguments

Z

Input matrix whose left leading singular vector is to be estimated.

lambda

Regularisation parameter

schatten

Schatten norm constraint to be used. Default uses Schatten-2-norm, i.e. the Frobenius norm. Also possible to use Schatten-1-norm, the nuclear norm.

max.iter

maximum iteration for ADMM, only used if schatten=1

tolerance

tolerance level for convergence checking, only used if schatten=1

Value

A vector that has the same length as nrow(Z) is returned.

Details

In case of schatten = 2, a closed-form solution for Mhat using matrix soft thresholding is possible. We use the closed-form solution instead of the ADMM algorithm to speed up the computation.

Examples

Run this code
# NOT RUN {
Z <- matrix(rnorm(20),4,5)
lambda <- 0.5
sparse.svd(Z, lambda)
# }

Run the code above in your browser using DataLab