Description
Recently I am learning how to do MCMC with TFP using your Bayesian Gaussian Mixture Model example at https://github.com/tensorflow/probability/blob/master/tensorflow_probability/examples/jupyter_notebooks/Bayesian_Gaussian_Mixture_Model.ipynb.
One thing that has confused me for a long time is the purpose of having
unconstraining_bijectors = [
tfb.SoftmaxCentered(),
tfb.Identity(),
tfb.Chain([
tfb.TransformDiagonal(tfb.Softplus()),
tfb.FillTriangular(),
])]
According to the descriptions mentioned above, "Hamiltonian Monte Carlo (HMC) requires the target log-probability function be differentiable with respect to its arguments. Furthermore, HMC can exhibit dramatically higher statistical efficiency if the state-space is unconstrained."
What I am not sure is this: does each element in unconstraining_bijectors
refer to the bijector used for the corresponding element in initial_state
?
i.e.: tfb.SoftmaxCentered()
is used to transform the component weights tf.fill([components], value=np.array(1. / components, dtype), name='mix_probs')
,
tfb.Identity()
is used to transform the means tf.constant(np.array([[-2, -2], [0, 0], [2, 2]], dtype)
, as there is no need to do transform,
and tfb.Chain([tfb.TransformDiagonal(tfb.Softplus()), tfb.FillTriangular(),]
is used to transform the Cholesky decomposition of the precision matrix (inversed covariance matrix) tf.eye(dims, batch_shape=[components], dtype=dtype, name='chol_precision')
?
Please help me clarify. Thank you!