Learn R Programming

scdensity (version 1.0.3)

SpectralShift: Performs the spectral shift on a matrix to make it numerically positive definite.

Description

Matrix L is assumed to have eigenvalues that are either all positive, or very close to zero. If any eigenvalues are less than less than threshold, a positive quantity is added to the diagonal.

Usage

SpectralShift(L, threshold = 1e-10)

Value

The spectral-shifted matrix.

Arguments

L

A square numeric matrix.

threshold

The eigenvalue threshold. Default 1E-10.