Should I check Multicollinearity When There is An Inverse?

81 Views Asked by At

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)

1

There are 1 best solutions below

0
On

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.