Questions tagged [dirichlet]

The Dirichlet distribution is a family of continuous multivariate probability distributions.

The Dirichlet distribution is a family of continuous multivariate probability distributions. It is the multivariate generalization of the beta distribution. Dirichlet distributions are very often used as prior distributions in Bayesian statistics, and in fact the Dirichlet distribution is the conjugate prior of the categorical distribution and multinomial distribution.

93 questions
0
votes
1 answer

Demonstration Code for Nested Dirichlet Process

My question is about how to implement the nested Dirichlet process (NDP) with R code. The NDP is suitable for clustering over distributions and simultaneously clustering within a distribution. Rodriguez et al. (2008) provided a simulation example to…
Y.Zhou
  • 21
  • 2
0
votes
2 answers

dirichlet process group selection

I understand the dirichlet process group selection as explained here: How to decide group assignments in Dirichlet process clustering But I don't understand why the DP group selection algorithm doesn't use a new item's features to determine the best…
0
votes
0 answers

RJags "Unable to Find Appropriate Sampler"

I'm trying to model the sizes of tortoise burrows using Line-Transect Distance Sampling and data augmentation. However, I keep getting the error "unable to find appropriate sampler." Some background: Burrows can be from 4cm to 55cm wide and are…
Heather G.
  • 53
  • 5
0
votes
0 answers

compute the density of a multivariate Dirichlet and Gamma distribution in R

I'd like to compute the density of a multivariate dirichlet distribution and to generate random realizations from such a distribution. Like what the function dmvnorm does with the multivariate normal distribution. I found this for the normal…
0
votes
1 answer

R - sum of the values of points in different tiles (polygons) of a Voronoi diagram

I have the following df: name x y A -47 134 B -11 311 C 49 100 D -40 138 E -33 233 F 30 134 I'm using the x & y coords to generate a Voronoi tessellation enclosed by a…
odenhem
  • 101
  • 2
  • 8
0
votes
1 answer

How to extract cluster id from Dirichlet process in PyMC3 for grouped data?

I am using PyMC3 to cluster my grouped data. Basically, I have g vectors and would like to cluster the g vectors into m clusters. However, I have two problems. The first one is that, it seems PyMC3 could only deal with one-dimensional data but not…
Hannah
  • 1
0
votes
1 answer

Creating "Histogram" From input of X values and Probability Estimates in R

Background I'm trying to replicate something like the following plots from the chapter on the Dirichlet Process in "Bayesian Data Analysis" by Gelman et. al. The images depict a stick-breaking process. The plots effectively show you a probability…
RMurphy
  • 293
  • 6
  • 12
0
votes
1 answer

Having trouble with Dirichlet 3d plot

I'm trying to create a 3D plot of a random draw from a Dirichlet distribution but it only seems to be plotting in 2 dimensions even though I have data for three variables. draw <- rdirichlet(100, alpha = c(.3,.4,.3)) scatter3D(x ,y,…
tlev
  • 83
  • 9
0
votes
2 answers

visualize latent dirichlet allocation results

I'm trying to use Latent Dirichlet Allocation LDA from genism library for Python. Is there any way to display results of the algorithm over training set in a form of a graph? Maybe with Venn's diagrams, or some chars?
striki
  • 1
0
votes
0 answers

Duplicate values in dictionary

I have a problem where after the outer loop ends, both dictionaries point to the same values. I have code of the sort: for state in states: probab_dist = numpy.random.dirichlet(some args..).flatten() for i, j in zip(word, range(len(word))): …
user8814
  • 94
  • 6
0
votes
2 answers

Package for Divide Chain of tesselations in R, spatstat package?

I am trying to create pretty figures of clustered points. Is there a package which will create the divide chain between tessellations of points? Ideally it would be fit for plotting in ggplot. Here is some example…
Zafar
  • 1,897
  • 15
  • 33
0
votes
1 answer

np.random.dirichlet with small parameter: embed future solution in current numpy

There is an ongoing discussion about the current np.random.dirichlet function, as it does not function for small parameters: In [1]: import numpy as np In [2]:…
Milla Well
  • 3,193
  • 3
  • 35
  • 50
0
votes
1 answer

Dirichlet boundary condition for Green function convolution in Fourier domain

I am currently working on the heat diffusion equation in 3D in python. I am resolving the heat diffusion equation with the convolution of the Green function of this equation with a source equation, which becomes a multiplication into a Fourier…
Magea
  • 137
  • 1
  • 10
0
votes
1 answer

Normalizing constant of mixture of dirichlet distribution goes unbounded

I need to calculate PDFs of mixture of Dirichlet distribution in python. But for each mixture component there is the normalizing constant, which is the inverse beta function which has gamma function of sum of the hyper-parameters as the numerator.…
0
votes
1 answer

rdirichlet distribution isn't working in R

I am attempting to run some code I wrote over a year ago and for some reason it is not working this time. Previously I had the matrix variables alpha and prob typed into R. However this time I am importing them as csv files so it's easier for me…
ams9q8
  • 1
  • 2