title: Is there a way to fit a 3D Gaussian distribution or a Gaussian mixture distribution to a vector?
body: <p>I have a vector of data points that seems to represent a 3D Gaussian distribution or a Gaussian mixture distribution. Is there a way to fit a 3D Gaussian distribution or a Gaussian mixture distribution to this matrix, and if yes, do there exist libraries to do that (e.g. in Python)?</p>
  
  <p>The question seems related to the following one, but I would like to fit a 3D Gaussian to it:
  <a href="https://stackoverflow.com/questions/27230824/fit-multivariate-gaussian-distribution-to-a-given-dataset">Fit multivariate gaussian distribution to a given dataset</a></p>
  
  <p>The targeted end results would look like this (a single distribution or a mixture):
  <a href="https://i.stack.imgur.com/UcOHy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UcOHy.png" alt="enter image description here"></a></p>
  
  <p>For example, very much simplified, my data vector (from which the Gaussian (mixture) distribution should be learned) looks like this:</p>
  
  <pre><code>[[0,0,0,0,0,0], [0,1,1,1,1,0], [0,1,2,2,1,0], [1,2,3,3,2,1], [0,1,2,2,1,0], [0,0,0,0,0,0]]
  </code></pre>