http://matrixprogramming.com/2011/03/linear-solve-in-python-numpy-and-scipy
This is a great tutorial on Linear Solver approaches in Python. In particular, I like the reference to the Cholesky Decomposition. For those that aren't familiar, Cholesky Decomposition only works on symmetric positive definite matrices. This is pretty common in the Statistics world, since those are the properties of a well defined Covariance Matrix.
When I write up my code, I'll make sure to write up a cool tutorial on how to do the Cholesky Decomposition in Python for inverting a Covariance Matrix. I promise!
Monday, February 23, 2015
Sparse Matrices in Python
In one of my previous jobs, my colleague wrote a very neat Python module that leveraged Sparse Matrix approach as defined here in Wikipedia.
I've been meaning to write something up similar to that, because I needed to use something similar to that in my dissertation work.
Wait, that's right, I won't need to do something like that, because it's right here in SciPy.
http://docs.scipy.org/doc/scipy/reference/sparse.html
I've been meaning to write something up similar to that, because I needed to use something similar to that in my dissertation work.
Wait, that's right, I won't need to do something like that, because it's right here in SciPy.
http://docs.scipy.org/doc/scipy/reference/sparse.html
Ridge Regression and Cross Validation in scikit
My dissertation work, Ridge Restricted Maximum Likelihood (RREML) is an extension of Ridge Regression applied to parametric covariance structures. In my dissertation we applied it to Spatial Statistics, but it would also apply to Time Series as well.
One of the things that I struggled with in my dissertation approach was choosing the appropriate ridge constant. I never got around to the much more favorable Cross Validation approach, but I instead used a secondary likelihood approach to estimate the ridge constant.
As I'm writing my algorithm in Python, I'm definitely going to leverage the scikit Ridge Regression approach to apply it to my RREML model.
http://scikit-learn.org/stable/modules/linear_model.html#ridge-regression
One of the things that I struggled with in my dissertation approach was choosing the appropriate ridge constant. I never got around to the much more favorable Cross Validation approach, but I instead used a secondary likelihood approach to estimate the ridge constant.
As I'm writing my algorithm in Python, I'm definitely going to leverage the scikit Ridge Regression approach to apply it to my RREML model.
http://scikit-learn.org/stable/modules/linear_model.html#ridge-regression
Spatial Distances in Python with GeoPy
So as I'm redoing my dissertation work, one of the functions I used was to calculate the distance between two locations based upon their coordinates (latitude and longitude). At the time, I was referencing and using what is commonly referred to as the Great Circle distance. So in the middle of my re-write into Python I stumbled across:
GeoPy
They not only provide the Great Circle distance calculation in their module, they introduced me to the Vincenty Distance. According to the module authors this is a more accurate approach for calculating the distance.
It looks like I have a new way to calculate my spatial distances, and even better, I don't have to program it up myself. I'm loving this Python re-write process already.
GeoPy
They not only provide the Great Circle distance calculation in their module, they introduced me to the Vincenty Distance. According to the module authors this is a more accurate approach for calculating the distance.
It looks like I have a new way to calculate my spatial distances, and even better, I don't have to program it up myself. I'm loving this Python re-write process already.
Time Series Analysis in Python with statsmodels
Wow, what a phenomenal discussion on Time Series analysis in Python. I was unaware of this statsmodels project, but now I'm psyched to find it. First of all, let me link to the talk that I'm referring to in my title:
Time Series Analysis in Python with statsmodels
Of course, this lead me to tracking down these experts, to learn more about what they do and wow I'm quite impressed. Here are links to their blogs:
Wes McKinney
Josef Perktold
Skipper Seabold
These three seem to be very involved in Scientific Computing in Python, check out their blogs and links to talks, etc. I know I will.
Time Series Analysis in Python with statsmodels
Of course, this lead me to tracking down these experts, to learn more about what they do and wow I'm quite impressed. Here are links to their blogs:
Wes McKinney
Josef Perktold
Skipper Seabold
These three seem to be very involved in Scientific Computing in Python, check out their blogs and links to talks, etc. I know I will.
Subscribe to:
Posts (Atom)