EDIT: See my follow-up post as well!
While porting my dissertation work that I wrote in R to Python, I need to leverage some of the great features of R such as its easy to use wrappers of LAPACK, specifically the Cholesky Decomposition to calculate the inverse of my covariance matrix. For those not familiar with LAPACK, it's a free open source library for calculating Linear Algebra routines. I'm talking all of them, and it's included in many open source scientific software due to its wide range of applicability and free and open nature. The one caveat... It's written in Fortran*.
Now, not to hate on Fortran, but not many people are programming their software or running their data analysis using it. Fortunately for us, some very good computer nerds out there wrote awesome wrappers in R and in Python (through NumPy and Scipy) to access them. It's been recommended to me that one should run optimized LAPACK libraries for your processor and Operating System, and build R (and probably NumPy and SciPy) pointing to those optimized routines. I'll let you read through the R Administration Manual to decide for yourself.
You can find the R discussion on LAPACK routines in the R Extensions Manual here.
As for Python, just check out the documentation for numpy.linalg or scipy.linalg.
Okay, now the real point of this note to myself, is because Googling access to LAPACK in Python led me to this awesome Blog Post:
Linear Solve in Python (NumPy and SciPy)
Evgenii Rudnyi did an awesome tutorial on using Cholesky Decomposition, and I thought I'd pass it along to anybody interested in leveraging these routines.
* I vaguely recall reading somewhere that LAPACK is usually compiled in C after porting LAPACK from Fortran to C using f2c.
No comments:
Post a Comment