Performs a Moore-Penrose generalized inverse (also called the Pseudoinverse).
matrix_inverse(m, tol = .Machine$double.eps^(2/3))
m | Matrix for which the inverse is required. |
---|---|
tol | Relative tolerance to detect zero singular values. |
An inversed matrix.
pinv from the pracma package
#> Sepal.Length Sepal.Width Petal.Length Petal.Width #> Sepal.Length 7.072722 -2.422965 -10.692191 3.622961 #> Sepal.Width -2.422965 2.100872 4.986386 -2.050192 #> Petal.Length -10.692191 4.986386 31.261498 -19.529388 #> Petal.Width 3.622961 -2.050192 -19.529388 16.090175