According
to the terminology of [1]}, posterior sampling methods for bnp mixture models can be divided into two classes: marginal and conditional methods.
Marginal methods, such
as [2]}, [3]}, [4]}, integrate out
the the infinite-dimensional component (REF ) of the hierarchical
model and sample from the marginal distribution of the remaining variables.
Conditional methods work directly on (REF ) and must solve the problem of sampling the trajectories of
an infinite-dimensional random element.
However, they
allow inference on the latent random measure \(\tilde{P}\) , for instance on the jump sizes.
An example of conditional method, which nicely fits our framework, is the Ferguson and Klass algorithm.
Unlike
marginal samplers, it allows for estimating non-linear functionals of
the underlying posterior distribution, such as credible intervals.
Here we sketch the conditional algorithm implemented in BNPdensity which
allows to draw posterior simulations from mixtures based on a general NRMI (a very thorough description of the algorithm can be found in [5]}).
It works equally well regardless of whether the kernel \(k\)  and \(P_0\) 
form a conjugate pair and readily yields
credible intervals.
The algorithm is an implementation of the posterior characterisation of NRMI provided in [6]}.
