deerlab.nearest_psd

nearest_psd(A)[source]

Find the nearest positive semi-definite matrix

This function takes a square matrix A and returns the nearest positive semi-definite matrix.

Parameters:
Andarray

The input matrix.

Returns:
Cpsdndarray

The nearest positive semi-definite matrix.

Notes

Modified from the algorithm in [1].

References

[1] tjiagoM (2020, July 28th),

How can I calculate the nearest positive semi-definite matrix? StackOverflow, https://stackoverflow.com/a/63131250/16396391