PiS: Matrix projection onto the nuclear norm unit sphere

Description Usage Arguments Details Value Examples

View source: R/method_inspect.R

Description

Projection (with respect to the inner product defined by the Frobenius norm) of a matrix onto the unit sphere defined by the nuclear norm.

Usage

1
PiS(M)

Arguments

M

Input matrix

Details

This is an auxiliary function used by the InspectChangepoint package. The projection is achieved by first performing a singular value decomposition, then projecting the vector of singular values onto the standard simplex, and finally using singular value decomposition in reverse to build the projected matrix.

Value

A matrix of the same dimension as the input is returned.

Examples

1
2
M <- matrix(rnorm(20),4,5)
PiS(M)

Tveten/capacc documentation built on Sept. 29, 2021, 5:31 a.m.