Symmetrises a matrix by averaging it with its transpose and, if the result is not positive definite, adds a small diagonal ridge.
Examples
A <- matrix(c(2, 0.9, 1.1, 2), 2)
make_pds(A) # averaged with its transpose
#> [,1] [,2]
#> [1,] 2 1
#> [2,] 1 2
isSymmetric(make_pds(A))
#> [1] TRUE
