aesara.tensor.nlinalg.pinv#
- aesara.tensor.nlinalg.pinv(x, hermitian=False)[source]#
Computes the pseudo-inverse of a matrix .
The pseudo-inverse of a matrix , denoted , is defined as: “the matrix that ‘solves’ [the least-squares problem] ,” i.e., if is said solution, then is that matrix such that .
Note that , so is close to the identity matrix. This method is not faster than
matrix_inverse
. Its strength comes from that it works for non-square matrices. If you have a square matrix though,matrix_inverse
can be both more exact and faster to compute. Also this op does not get optimized into a solve op.