Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to compute a Kernel Density from high dimensional data ($n > 2$). The underlying (generative) model is assumed unknown.

The goal is to draw samples from this estimate, in a sense creating synthetic data akin to the underlying distribution.

I was hoping to use Bayesian nonparametrics for this, since the complexity of the model can then grow with the amount of observed data.

The intuition was to use the Dirichlet Process with a Gaussian kernel. DPpackage supports this functionality, but I have little clue on how to interpret the results or sample from them.

Does anyone have a short explanation on how to interpret the returned values from the DPdensity function, and possibly sample from them?

share|improve this question

Neal 2000 gives an overview of the MCMC implementations for DP models. Indeed the package docs reference algorithm 8 from that paper as the default in the method you mention.

Looking at the docs I'd suggest having a poke at the thetasave save attribute of the returned object. I'd guess the thetas will involve tuples of (mean vector, inverse wishart matrix) as the components of the gaussian mixture model sampled at each iteration.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.