Path: blob/master/notebooks/book2/10/gmm_advi_bijax.ipynb
1192 views
Kernel: Python [conda env:ajax]
Variational Bayes for Gaussian Mixture Models using ADVI
We use the BIJAX library (https://github.com/patel-zeel/bijax). For a TFP implementation, see https://github.com/probml/pyprobml/blob/master/notebooks/book2/10/gmm_advi_tfp.ipynb
In [12]:
Helper functions for plotting
In [13]:
Load data
In [14]:
Out[14]:
(272, 2)
Define model
In [15]:
MAP estimation
In [16]:
In [29]:
In [30]:
Out[30]:
In [31]:
Out[31]:
/home/patel_zeel/miniconda3/envs/ajax/lib/python3.9/site-packages/probml_utils/plotting.py:80: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
ADVI
In [4]:
In [5]:
In [6]:
Out[6]:
In [8]:
In [9]:
Out[9]:
/home/patel_zeel/miniconda3/envs/ajax/lib/python3.9/site-packages/probml_utils/plotting.py:80: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/ajax/lib/python3.9/site-packages/probml_utils/plotting.py:80: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
/home/patel_zeel/miniconda3/envs/ajax/lib/python3.9/site-packages/probml_utils/plotting.py:80: UserWarning: set FIG_DIR environment variable to save figures
warnings.warn("set FIG_DIR environment variable to save figures")
In [10]:
Out[10]:
{'correlation_tril': (10, 2, 2),
'loc': (10, 2),
'mixture_weights': (10,),
'scale': (10, 2)}