Learn R Programming

sams (version 0.4.3)

Merge-Split Samplers for Conjugate Bayesian Nonparametric Models

Description

Markov chain Monte Carlo samplers for posterior simulations of conjugate Bayesian nonparametric mixture models. Functionality is provided for Gibbs sampling as in Algorithm 3 of Neal (2000) , restricted Gibbs merge-split sampling as described in Jain & Neal (2004) , and sequentially-allocated merge-split sampling , as well as summary and utility functions.

Copy Link

Version

Install

install.packages('sams')

Monthly Downloads

189

Version

0.4.3

License

GPL-3

Maintainer

David B Dahl

Last Published

April 19th, 2022

Functions in sams (0.4.3)

dCRP

Compute Probability Mass of a Partition Under the Two Parameter Chinese Restaurant Process (CRP)
poch

Compute the Pochhammer Symbol (Rising Factorials) With Increment
simpleMergeSplit

Merge-Split Sampling for a Partition Using Uniformly Random Allocation
p18_mvn

Independent Multivariate Normal Data (p = 18)
seqAllocatedMergeSplit_base

Base Functionality for the seqAllocatedMergeSplit Function
p18_corr_mvn

Correlated Multivariate Normal Data (p = 18)
p6_mvn

Independent Multivariate Normal Data (p = 6)
partitionEntropy

Calculate the Entropy of a Set Partition
psm

Compute the Posterior Pairwise Similarity for All Pairs of Items
p18_bern

Multivariate Independent Bernoulli Data (p = 18)
nealAlgorithm3

Conjugate Gibbs Sampler for a Partition
sizeOfLargestCluster

Calculate the Number of Items in the Largest Cluster of a Set Partition
isCanonical

Check if a Vector of Cluster Labels is in Canonical Form
psmMergeSplit

Merge-Split Sampling for a Partition Based on Sequential Allocation Informed by Pairwise Similarities
p6_big_bern

Large Sample Multivariate Independent Bernoulli Data (p = 6)
psmMergeSplit_base

Base Functionality for the psmMergeSplit Function
joinExistingCluster

Join Item to an Existing Cluster
nClusters

Count the Number of Clusters in a Set Partition
p6_bern

Multivariate Independent Bernoulli Data (p = 6)
transformedWeights

Enumerate Transformed Weights for Choosing i and j Non-Uniformly
seqAllocatedMergeSplit

Merge-split Sampling for a Partition Based on Sequential Allocation of Items
restrictedGibbsMergeSplit

Merge-Split Sampling for a Partition Based on Restricted Gibbs Scans
asSetPartition

Coerce a Set Partition as Numeric Vectors of Cluster Labels to a List Structure
clusterProportions

Compute the Proportion of Items in Each Cluster for All Partitions
clusterTrace

Plot Traces of Cluster Sizes
clusterWithItem

Identify Which Cluster Contains a Given Item
asClusterLabels

Coerce a Set Partition in List Structure to Numeric Vectors of Cluster Label
asCanonical

Coerce a Vector of Cluster Labels to Canonical Form
createNewCluster

Create a New Cluster with Given Item
getThetas

Get theta Parameters from a Numeric Vector of Cluster Labels and Unique phi Values