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