Library

Types

DPMNeal3.DPMType
DPM(rng::AbstractRNG, N; K0 = 1, a0 = 2.0, b0 = 4.0)

Initialize a generic DPM with N observations, K0 initial clusters and a Gamma(a0, b0) prior distribution for the DP mass parameter.

Accessors

DPMNeal3.n_clustersFunction
n_clusters(m::AbstractDPM)

Return the current number of active clusters.

DPMNeal3.passive_clustersFunction
passive_clusters(m::AbstractDPM)

Return (a subset of) the current set of passive clusters.

DPMNeal3.dp_massFunction
dp_mass(m::AbstractDPM)

Return the current DP mass parameter.

Interface

DPMNeal3.update_suffstats!Method
update_suffstats!(m::AbstractDPM, data)

Update the sufficient statistics in m from scratch, given the dataset data.

DPMNeal3.update_suffstats!Method
update_suffstats!(m::AbstractDPM, data, i::Int, k::Int, l::Int)

Update the sufficient statistics in m after the ith cluster label changes from k to l, given the dataset data.

DPMNeal3.update_hyperpars!Function
update_hyperpars!(rng::AbstractRNG, m::AbstractDPM, data)

Update the kernel hyperparameters in m, given the dataset data.

DPMNeal3.logpredlikFunction
logpredlik(m::AbstractDPM, data, i::Int, k::Int)

Return the log-pdf of the ith response at its current value, given the other responses, the other cluster labels, and the own cluster label fixed at k. The responses should be present in data.