mardi 13 juillet 2021

Numpy: generate Gaussian random matrix with random.normal or random.multivariate_normal?

I'm trying to implement an algorithm from a paper I read that requires to generate a Gaussian random matrix. Since they don't specify anything else, I assume that it is of 0 mean and 1 standard deviation.

I found numpy.random.normal and numpy.random.multivariate_normal. Both can produce random matrices but random.multivariate_normal seems to be more flexible (vectors for mean and covariate matrix).

Would I get a gaussian matrix by just using random.normal or is that a totally different result? If it only works with random.multivariate_normal, what would I need to use as a covariate matrix?




Aucun commentaire:

Enregistrer un commentaire