DirichletProcessMixture — The Dirichlet process mixture distribution

Usage

DirichletProcessMixture(n: Int, alpha: Double, dist: Distribution<Distribution<a>>) → Distribution<List<a>>

Arguments

n:

The number of observations

alpha:

The concentration parameter controlling how often new components are drawn

dist:

The base distribution on component distributions

Description

Draw n exchangeable observations from component distributions shared according to a Dirichlet process with concentration alpha. Each new component distribution is drawn from dist.

Examples

~DirichletProcessMixture(10, 1, discrete([(Normal(0,1),1), (Normal(5,1),1)]))