Estimate Poisson process rate

31 views
Skip to first unread message

Synapski

unread,
Apr 20, 2014, 7:35:19 PM4/20/14
to dis...@factorie.cs.umass.edu
I'm trying to estimate the rate of a Poisson process. I modified the GaussianDemo object like this :

import cc.factorie._
import cc.factorie.directed._
import cc.factorie.variable._
import cc.factorie.model._
import cc.factorie.infer._


object ExamplePoisson extends App {
  implicit val model = DirectedModel()
  implicit val random = new scala.util.Random(0)

  val lambda = new DoubleVariable(5.0)
  val data = for (i <- 1 to 1000) yield new IntegerVariable :~ Poisson(lambda)

  Maximize(lambda)
  println(s"estimated lambda ${lambda.value}")

}

Running this code is giving me the following error :

Exception in thread "main" java.lang.Error: No maximizing method found.

while the Gaussian version is working fine. Am I missing something?

Thanks

Ryan Steckel

unread,
Oct 9, 2015, 5:42:34 PM10/9/15
to Factorie
I wondered the same thing. When I dug into the code a bit, I saw that the Maximize function is just a wrapper function for a suite of Maximizers (MaximizeGate, MaximizeProportions, MaximizeGaussianMean, MaximizeGaussianVariance, etc.) There is no MaximizePoisson defined in the Possion class like there is for Guassian, Beta and Dirichlet. Even if there was it looks like it would have to be added to this MaximizeSuite class. Not sure why that one is missing. 
Reply all
Reply to author
Forward
0 new messages