[Numpy-discussion] Identifying Colinear Columns of a Matrix

Fernando Perez fperez.net@gmail....
Fri Aug 26 13:01:46 CDT 2011

On Fri, Aug 26, 2011 at 7:41 PM, Mark Janikas <mjanikas@esri.com> wrote:
> I wonder if my last statement is essentially the only answer... which I wanted to avoid...
> Should I just use combinations of the columns and try and construct the corrcoef() (then ID whether NaNs are present), or use the condition number to ID the singularity?  I just wanted to avoid the whole k! algorithm.

This is a completely naive, off-the-top of my head reply, so most
likely completely wrong.  But wouldn't a Gram-Schmidt type process let
you identify things here?   You're effectively looking for n vectors
that belong to an m-dimensional subspace with n>m.  As you walk
through the G-S process you could probably track the projections and
identify when one of the vectors in the m-n set is 'emptied out' by
the G-S projections, and would have the info of what it projected

I don't remember the details of G-S so perhaps there's  a really
obvious reason why the above is dumb and doesn't work.  But just in
case it gets you thinking in the right direction... (and I'll learn
something from the corrections)



More information about the NumPy-Discussion mailing list