5

I was wondering if someone knew about a python package that implements MLE to estimate parameters of a Dirichlet distribution.

cryp
  • 2,285
  • 3
  • 26
  • 33

1 Answers1

8

Eric Suh has a package here.

$ pip install git+https://github.com/ericsuh/dirichlet.git

Then:

import numpy
import dirichlet
a0 = numpy.array([100, 299, 100])
D0 = numpy.random.dirichlet(a0, 1000)
dirichlet.mle(D0)
Tim Hopper
  • 945
  • 2
  • 13
  • 29