nachiket92 / conv-social-pooling

Code for model proposed in: Nachiket Deo and Mohan M. Trivedi,"Convolutional Social Pooling for Vehicle Trajectory Prediction." CVPRW, 2018
MIT License
326 stars 97 forks source link

Covariance matrix not positive semidefinite #24

Closed mgeisslinger closed 4 years ago

mgeisslinger commented 4 years ago

When I try to compute the explicit probabilities of the bivariate gaussian distribution, I first define the covariance matrix as [[1/sigX, rho], [rho, 1/sigY]]. This is working for most of the predictions. However, sometimes this matrix is not positive semidefinite which throws an error. Any clue on what am I doing wrong?

nachiket92 commented 4 years ago

sigX and sigY are the reciprocals of standard deviations along X and Y. Rho is the correlation of X and Y. The covariance matrix will be: [[(1/sigX)^2, rho/(sigX.sigY)], [rho/(sigX.sigY), (1/sigY)^2]