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
2
votes
1 answer

Dirichlet process in PyMC 3

I would like to implement to implement the Dirichlet process example referenced in Implementing Dirichlet processes for Bayesian semi-parametric models (source: here) in PyMC 3. In the example the stick-breaking probabilities are computed using the…
Kiudee
  • 413
  • 3
  • 9
2
votes
1 answer

In LDA model, how are the multinomial parameters (theta) drawn from the Dirichlet prior weight (alpha)?

I'm a freshman who is studying LDA (Latent Dirichlet Allocation) model nowadays. But, I faced a problem. How is the theta drawn from the alpha? theta ~ Dir(alpha) According to my short understanding, the variable theta is a vector with its length K…
ChangUk
  • 105
  • 1
  • 11
1
vote
0 answers

KeyError while printing trace in pymc3

I'm trying to perform the spectral unmixing technique with the MCMC algorithm. But I encountered a problem while I ran it. This is the part of the code I'm running: import pymc3 as pm import theano.tensor as tt import arviz as az """ Perform…
Alex
  • 11
  • 3
1
vote
0 answers

Linear Transformation of Dirichlet Distribution

I am wondering what is the best way to represent the probability distribution of a linearly transformed Dirichlet distribution: let {X = [x1, x2 ... xn] | Σxi = 1} be a set of multinomial probabilities that follow a Dirichlet distribution…
1
vote
1 answer

Is it possible to retrive other than the best Dirichlet components?

I run microbiota analysis with library(DirichletMultinomial) and fit the count data to values of k from 1 to 15. I got the best result for k = 5. You can view the plot: Model fit as a function of Dirichlet component number received. However I would…
mschmidt
  • 89
  • 7
1
vote
3 answers

Transformed Dirichlet array with range [-1,1] in numpy

A random vector sampled from the Dirichlet distribution contains values that fall in the domain [0,1] and they sum to 1. In numpy it can be programmed like this for a vector size of 5: x = numpy.random.dirichlet(np.ones(5)) Instead, I would like a…
develarist
  • 1,224
  • 1
  • 13
  • 34
1
vote
1 answer

Can `dmn {DirichletMultinomial}` be run on multiple cpu cores in R?

I analyse microbiome data using library(phyloseq) library(microbiome) library(DirichletMultinomial) and several other libraries. Fitting Dirichlet-Multinomial models to count data dmn {DirichletMultinomial} takes quite a long time. Can the…
mschmidt
  • 89
  • 7
1
vote
1 answer

Draw categorical vectors from pyMC3 with dirichlet prior

I want to draw categorical vectors where its prior is a product of Dirichlet distributions. The categories are fixed and each element in the categorical vector corresponds to a different Dirichlet prior. Here is a categorical vector of length 33…
1
vote
0 answers

3d ternary scatter plot

I would like to be able to create a plot of four variables that are compositions. The fourth variable is simply 1.0 minus the first three.…
Stephen Clark
  • 573
  • 3
  • 18
1
vote
0 answers

Plotting stick-breaking process in R based on Python code

I'd like to reproduce Python code to R code about Stick-breaking process, which is one of construction schemes for Dirichlet Process. However, the plot I drew within R is quite different in that DP sample distributions are not around the base…
Eunji Lee
  • 33
  • 4
1
vote
3 answers

How to pass a formula object to DirichReg (setting up for function)

I am trying to pass a formula object to a Dirichlet Regression, using the DirichReg package in R. As shown below, the package does not seem able to accept formulas in this format, but nothing in the documentation notes this limitation. The reason…
jFrostad
  • 85
  • 1
  • 6
1
vote
0 answers

DPdensity() with multivariate (3 variables)

for Bayesian Dirichelt process mixture model, I used DP package and DPdensity(). DPdensity() works well for univarate and Bivaraite but not for mulitvaraites. However, I used data with 3 variables, and it doesn't give x1,x2 or fun1, fun2, and no…
rocknRrr
  • 341
  • 1
  • 10
1
vote
1 answer

Mass Point, Dirac Delta in Dirichlet Processes

When dealing with Dirichlet Processes, according to [Teh, 2007], a DP is defined as by a base Probability H and a scale factor "alpha" According to the Stick Breaking Construction, the random draws G from a DP: G~DP(alpha,H) are given…
Leon palafox
  • 2,675
  • 6
  • 27
  • 35
1
vote
1 answer

How to decide group assignments in Dirichlet process clustering

As in the Dirichlet clustering, the dirichlet process can be represented by the following: Chinese Restaurant Process Stick Breaking Process Poly Urn Model For instance, if we consider Chinese Restaurant Process the process is as follows: …
maliks
  • 1,102
  • 3
  • 18
  • 42
1
vote
1 answer

fftw3 for poisson with dirichlet boundary condition for all side of computational domain

I am trying to solve Poison equation with Dirichlet boundary condition for four sides of computational domain. As known that I should use FFTW_RODFT00 to satisfy the condition. However, the result is not correct.Could you please help me? #include…
Luc Nguyen
  • 101
  • 9