Description Usage Arguments Value References See Also

View source: R/seqAllocatedMergeSplit_base.R

Merge-split proposals for conjugate "Chinese Restaurant Process" (CRP) mixture models using sequential allocation of items, as originally described in Dahl (2003), with additional functionality for the two parameter CRP prior.

1 2 3 4 5 6 7 8 | ```
seqAllocatedMergeSplit_base(
partition,
logPosteriorPredictiveDensity = function(i, subset) 0,
mass = 1,
discount = 0,
nUpdates = 1L,
selectionWeights = NULL
)
``` |

`partition` |
A numeric vector of cluster labels representing the current partition. |

`logPosteriorPredictiveDensity` |
A function taking an index |

`mass` |
A specification of the mass (concentration) parameter in the CRP
prior. Must be greater than the |

`discount` |
A numeric value on the interval [0,1) corresponding to the discount parameter in the two-parameter CRP prior. |

`nUpdates` |
An integer giving the number of merge-split proposals before returning. This has the effect of thinning the Markov chain. |

`selectionWeights` |
A matrix or data frame whose first two columns are the unique pairs of data indices, along with a column of weights representing how likely each pair is to be selected at the beginning of each merge-split update. |

- partition
An integer vector giving the updated partition encoded using cluster labels.

- accept
The acceptance rate of the Metropolis-Hastings proposals, i.e. the number accepted proposals divided by

`nUpdates`

.

Dahl, D. B. (2003). An improved merge-split sampler for conjugate Dirichlet process mixture models. Technical Report, 1, 086.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.