Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At Machine Learning algorithms there are usually inversion process about matrices and sometimes Matlab throws error when Multicollinearity occurs.

Should I check Multicollinearity(and how) everytime before I inverse a Matrix (and use pseudo inverse - pinv)

share|cite|improve this question

I think you can just always use the p inverse. If the inverse exists it will be returned, otherwise the p inverse will be returned. The only drawback that I could think of might be performance, but I think it should be OK.

Sidenote: in most cases you should try to avoid calculating the inverse due to potential numerical inaccuracies. For solving systems of linear equations for example, look into ldivide or rdivide.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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