probabilistic_robotics icon indicating copy to clipboard operation
probabilistic_robotics copied to clipboard

What if the covariance matrix is singular?

Open Yu-Xiaoxian opened this issue 4 years ago • 2 comments

In Ch.3 assignment 1.3, at t=1, the covariance matrix [0.25, 0.5; 0.5, 1.0] is a singular matrix. When we want to calculate its gaussian probabilistic, we need the matrix to be invertible. How can we deal with this situations.

Yu-Xiaoxian avatar Apr 26 '20 09:04 Yu-Xiaoxian

Hi sorry for slow response. In 1 dimension when σ → 0 the normal distribution with mean 0 converges (in distribution, weak convergence) to the delta dirac distribution: all the probability mass is concentrated in 0. We can generalize in 2d when 1 eigen value of the covariance matrix is null the 2d gaussian actually degenerates to a 1d gaussian with all probability mass concentrated on a line (direction defined by eigenvector corresponding to the non null eigenvalue).(corrected a typo in the P matrix). So the uncertainty ellipse becomes a bounded interval on a line. Does this clarify ? is it the point you wanted to make ?

pptacher avatar May 06 '20 07:05 pptacher

Your replay is beyond my point. The probability mass center explain the covariance matrix very clear, thanks.

When I use random module of Python to sample from normal distribution, I add a tiny diagonal matrix to the covariance matrix, making it ill but not singular, so it becomes invertible. And the result shows exactly what you've said, the sample points centered in a line.

Thanks again for your replay, that makes the result more clear.

Yu-Xiaoxian avatar May 07 '20 03:05 Yu-Xiaoxian