7.10 Exercises
Generate synthetic data from a mixture of 3 Gaussians. Check the accompanying Jupyter notebook for this chapter for an example of how to do this. Fit a finite Gaussian mixture model with 2, 3, or 4 components.
Use LOO to compare the results from exercise 1.
Read and run through the following examples about mixture models from the PyMC documentation:
Marginalized Gaussian mixture model: https://www.pymc.io/projects/examples/en/latest/mixture_models/marginalized_gaussian_mixture_model.html
Dependent density regression: https://www.pymc.io/projects/examples/en/latest/mixture_models/dependent_density_regression.html
Refit
fish_data
using a NegativeBinomial and a Hurdle NegativeBinomial model. Use rootograms to compare these two models with the Zero-Inflated Poisson model shown in this chapter.Repeat exercise 1 using a Dirichlet process.
Assuming for a moment that you do not know the correct species/labels for the iris dataset, use a mixture model to cluster the...