I am trying to write a generator in python which generates a N*M matrix of random numbers using gaussian (normal) distribution.
given is N and M and the number of Gaussian random fields (normal distribution). The numbers in the matrix should also be between 0 and 1. For example, a 100 * 80 matrix of float numbers between 0 and 1, which are generated from 5 different Gaussian distributions. The mean and variance of these distributions can be chosen arbitrarily. It is also arbitrary which and how many rows are generated by which distribution. The important thing is that the numbers in a row are generated in the same normal distribution. (Or rather, each row is a point that exists in a specific multivariate gaussian distribution)
I have already tried scipy.stats.truncnorm
. Here I do not know how to generate the rows by different distribution and num.random.multivariate_normal
is too complex to understanding. I have been looking for a long time and can find neither a good possibility to pass the restriction with the numbers between 0 and 1 nor find a way to generate the numbers from different normal distributions.