convoliution / Code-Medley

Little things I've written
1 stars 0 forks source link

Implement matrix inverse from scratch #2

Open convoliution opened 6 years ago

convoliution commented 6 years ago

Right now in linalg.py, I'm using numpy.linalg.inv() for matrix inverses. I'd like to implement it from scratch instead, but it looks rather difficult...

Cholesky decomposition looks tractable, see:

convoliution commented 6 years ago

Note that Cholesky decomposition is only applicable to Hermitian matrices, which will work for PCA but hopefully I can also implement a more general-case algorithm like LUP decomposition as a fallback

convoliution commented 6 years ago

How to compute a matrix inverse using Cholesky decomposition

Back- and forward substitution