update: I realized the core of question is about ill-conditioning of the matrix (aka Multicollinearity). In a computer, with floating point arithmetic, it is impossible to talk about full-rankness. We can only measure the degree in which it occurs. Thus, I still have a question. Better rewritten.

I have seen in StackOverflow suggestions of dividing the biggest singular value by the smallest. Is performing an entire SVD really the fastest solution?

I am writing a software that needs to check the full-rankness of a matrix M. It makes use of a fast linear algebra library (LAPACK). Since it also needs the pseudo-inverse of the matrix, it performs Singular Value Decomposition first, to be able to calculate the rank. After that it calculates the pseudo-inverse.

However, if we measure only the SVD part of the calculation, it is already twice slower than my entire previous pseudo-inverse calculation "pinvRR" (which was based on ridge regression theory).

Can I take advantage of the pinvRR result to check if the matrix is full-rank?

  • $\begingroup$ pseudo-inverse. $\endgroup$ – viyps Mar 8 '14 at 17:40
  • $\begingroup$ SVD turned out to be much more stable numerically than ridge regression. $\endgroup$ – viyps Apr 10 '14 at 18:58
  • 1
    $\begingroup$ You can estimate the conditional number without running SVD... $\endgroup$ – d.k.o. Apr 15 '14 at 2:04

If you are using LAPACK, it has DGECON function which estimates the reciprocal of the condition number of a real matrix in $\| .\|_1$ or $\|.\|_{\infty}$. It's a way faster than SVD and gives pretty good estimate (internally it performs LU decomposition).

  • $\begingroup$ Yes I am using LAPACK via MTJ (netlib). Sounds good, I need some time to test it. Any practical considerations on how to assess the returned value are welcome. $\endgroup$ – viyps Apr 15 '14 at 17:57
  • $\begingroup$ Actually, Matlab uses the same implementation. So, if you just want to check, run $rcond(A)$ (if $A$ is ill-conditioned the result will be close to 0) $\endgroup$ – d.k.o. Apr 15 '14 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.