This function computes the Moore-Penrose pseudoinverse of a square matrix using singular value decomposition.
solve_svd(x, tolerance = 2.220446e-16)
x | A square matrix |
---|---|
tolerance | The tolerance to consider an eigenvalue equals to zero. |
A matrix with the same dimension of x
.
Tiago Olivoto, tiagoolivoto@gmail.com
#> [1] 0solve_svd(mat)#> [,1] [,2] #> [1,] 0.01176471 0.04705882 #> [2,] 0.02352941 0.09411765# }