after searching in the python numpy, scipy and sklearn module, there is no function who can generate p samples of a gmm (gaussian mixture model) for parameter means, covariances and the weight of each multidimentionnal gaussian of dimension n. Any clue or guidance please to generate that ? Thank you for your time

  • $\begingroup$ How large is $n$? $\endgroup$ May 15, 2023 at 3:38
  • $\begingroup$ -1. An earlier, now deleted, comment solved this for you, and @stéphanelaurent in, at the moment, an answer below has answered it too without acknowledgement. $\endgroup$ May 27, 2023 at 2:35

1 Answer 1


Pick an integer i at random with probability p_i, the i-th weight. Then sample from the corresponding multidimensional Gaussian distribution. Repeat p times.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.