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
3
votes
0 answers

Dirichlet Regression using Caret package

I am attempting to predict tree species composition using Sentinel 2A imagery and forest plot data. I have calculated the proportion of basal area (the cross-sectional area trees of a given species occupy within the plot divided by the total…
Sean McKenzie
  • 707
  • 3
  • 13
3
votes
1 answer

Call R library DirichletReg from Python using rpy2

I'm trying to do Dirichlet Regression using Python. Unfortunately I cannot find a Python package that does the job. So I tried to call R library DirichletReg using rpy2. However, it is not very intuitive to me how to call a regression function such…
LinX
  • 35
  • 3
3
votes
1 answer

DPGMM Clustering All Values into Single Cluster

So I have converted my corpus into a nice word2vec matrix. This matrix is a floating point matrix of with negative & positive numbers. I can't seem to get the infinite dirichlet process to give me any cohesive answer. An example output [for 2…
bge0
  • 901
  • 2
  • 10
  • 25
3
votes
2 answers

How to make Conditional Probability Tables (CPTs) for Bayesian networks with pymc

I would like to build a Bayesian network of discrete (pymc.Categorical) variables that are dependent on other categorical variables. As a simplest example, suppose variables a and b are categorical and b depends on a Here is an attempt to code it…
shpigi
  • 185
  • 2
  • 8
2
votes
1 answer

Dominance analysis with Dirichlet regression: error related to formula syntax?

The goal I want to run dominance analysis on a Dirichlet regression, to approximate the relative importance of a set of predictors (scaled continuous predictors, continuous predictors with splines, and factors). Dirichlet regression is an extension…
M. Riera
  • 101
  • 5
2
votes
0 answers

Maximum likelihood estimator stuck at bounds

I'm working on setting up a maximum likelihood estimator to estimate the parameters for a dirichlet-multinomial distribution. Based on what I've seen elsewhere, it looks like the function ddirichlet.multinom() is working as expected, but when I pass…
Mark Rieke
  • 306
  • 3
  • 13
2
votes
0 answers

LDA: Coherence Values using u_mass v c_v

I am currently attempting to record and graph coherence scores for various topic number values in order to determine the number of topics that would be best for my corpus. After several trials using u_mass, the data proved to be inconclusive since…
Alexia M.
  • 49
  • 4
2
votes
0 answers

How to model Mixture of Bernoullis in pymc3

I'm trying to use Dirichlet Processes to identify clusters in my binary data. I'm using the tutorial as a starting point, but the tutorial is framed where the outcome is a mixture of 1D normal or poisson distributed variables. I have multiple…
Stuart Lacy
  • 1,963
  • 2
  • 18
  • 30
2
votes
1 answer

Hierarchical Dirichlet Process - Inferring Truncation Level

I am making use of the HDP implementation by Gensim to infer the topics of a dataset, but I have a question regarding the truncation level. Is there a way to infer the most appropriate truncation level? I have noticed that the final number of…
2
votes
1 answer

Determine the document ID on Mahout LDA Output

I've successfully ran mahout lda, and displayed the ouput using the command mahout ldatopics. For example my topics are science and sports. then the output will be like: topic 0 basketball, play, baseball topic 1 research, study, philosophy My…
2
votes
0 answers

Finding dirichlet priors of a dataset with PyMC3

How to find the dirichlet priors using pymc3? I've tried the following: import pymc3 as pm import numpy as np population = [139212, 70192, 50000, 21000, 16000, 5000, 2000, 500, 600, 100, 10, 5, 5, 5, 5] with pm.Model() as model: zipfy =…
alvas
  • 115,346
  • 109
  • 446
  • 738
2
votes
1 answer

How to fit a finite mixture of Dirichlet distributions

I have a compositional sample and I would like to fit a finite mixture of Dirichlet distributions. To be more precise, consider the following example: library(gtools) set.seed(1) PROB = c(0.25, 0.15, 0.60) ALPHA = list( c(1,1,1), c(2,1,1), …
marc1s
  • 779
  • 6
  • 24
2
votes
0 answers

MLE for a Polya Distribution

I'm working on programming a MLE for the Polya distribution using scipy. The Nelder-Mead method is working, however I get a "Desired error not necessarily achieved due to precision loss." error when running BFGS. The Nelder-Mead method seems like…
lobgoblin
  • 75
  • 7
2
votes
0 answers

d'Hondt method inverse calculator

I've found this code from Carlos Gil Bellosta for seats distribution in electoral systems with d'Hondt method. # d'Hondt scores and counts dHondt <- function(candidates, votes, seats){ tmp <- data.frame( candidates = rep( candidates, each =…
calidonia
  • 21
  • 3
2
votes
1 answer

Dirichlet Distribution unit testing

Does anyone has reliable data that I could use to write some unit tests for a new implementation of the Dirichlet distribution?
Leandro Caniglia
  • 14,495
  • 4
  • 29
  • 51