Near positive definite (NearPD) of a symmetric matrix in Julia

ProximalOperators exposes the IndPSD type, whose proximal operator is the projection onto the positive semidefinite cone (with the Frobenius norm taken as distance).

More info here.

Is this what you’re looking for?

Edit: an example snippet

using ProximalOperators

# X is your symmetric matrix
P, _ = prox(IndPSD(), X)
9 Likes