2Obe
2Obe

Reputation: 3720

Gaussian Mixture Model - Singular matrix

During the calculation of a Gaussian Mixture Model I have to calculate the pdf() of the multivariate Gaussian distribution. I do this using the scipy multivariate_normal() method. Now during the calculations I encounter the situation that I get an error which says

LinAlgError: singular matrix

Setting the allow_singular parameter of the scipy multivariate_normal() = True circumvents this error and I get a quite meaningful result: enter image description here

So how is scipy "allowing" for singularity and what are the consequences for the calculations? --> If there are no consequences, strictly speaking, this parameter could be set to TRUE by default (but it isn't).

Upvotes: 1

Views: 2629

Answers (1)

2Obe
2Obe

Reputation: 3720

This answer does not answer the question how scipy allows for singularity and also not what conseqences this behaviour has on the results but it gives a little bit more insight into what is going on during the calculations:

EDIT: I have posted an detailed answer on what is happening when we run into singularity issues during the calculations of a GMM here

Upvotes: 2

Related Questions