'how to create a mixture of gaussian distributions from data points generated using normal distribution
I'm trying to create a mixture of gaussian distributions in 2D, 5D and 10D from data points that follow normal distribution. Till now i was able to create data points that follow normal distribution using.
import numpy as np
data = np.random.normal(0.1, 0.3, size=(5000))
My question is how can I create mixture of gaussian distributions (in 2D, 5D, 10D) from the above data points ?
Solution 1:[1]
It depends on whether you wanna to create random variable where of individual distributions are independent or there is some covariation between distributions.
If there is presence of covariation matrix, I will use vector of uniform distributed random variables, and transform this vector into vector of random variables with normal distribution using covariance matrix.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Peter Trcka |
