(gaussian_mixture_model)=
:::{post} April, 2022 :tags: mixture model, classification :category: beginner :author: Abe Flaxman :::
A mixture model allows us to make inferences about the component contributors to a distribution of data. More specifically, a Gaussian Mixture Model allows us to make inferences about the means and standard deviations of a specified number of underlying component Gaussian distributions.
This could be useful in a number of ways. For example, we may be interested in simply describing a complex distribution parametrically (i.e. a mixture distribution). Alternatively, we may be interested in classification where we seek to probabilistically classify which of a number of classes a particular observation is from.
First we generate some simulated observations.
In the PyMC model, we will estimate one $\mu$ and one $\sigma$ for each of the 3 clusters. Writing a Gaussian Mixture Model is very easy with the pm.NormalMixture distribution.
We can also plot the trace to check the nature of the MCMC chains, and compare to the ground truth values.
And if we wanted, we could calculate the probability density function and examine the estimated group membership probabilities, based on the posterior mean estimates.
pm.NormalMixture.:::{include} ../page_footer.md :::