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

View source: R/helper_functions.R

SpectralShiftR Documentation

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)

Arguments

L

A square numeric matrix.

threshold

The eigenvalue threshold. Default 1E-10.

Value

The spectral-shifted matrix.


scdensity documentation built on Sept. 12, 2024, 7:35 a.m.