org.knowceans.dirichlet.sandbox
Class InvGammaArms

java.lang.Object
  extended by org.knowceans.arms.ArmSampler
      extended by org.knowceans.dirichlet.sandbox.InvGammaArms

public class InvGammaArms
extends ArmSampler

InvGammaArms implements the inverse of a vague Ga(1,1) as described as the hyperparameter distribution of component mixing proportions for the infinite GMM by Rasmussen (2000).

Author:
gregor

Field Summary
 
Fields inherited from class org.knowceans.arms.ArmSampler
DEREF, EYEPS, XEPS, YCEIL, YEPS
 
Constructor Summary
InvGammaArms()
           
 
Method Summary
 double logpdf(double alpha, java.lang.Object params)
          Implements the posterior distribution to p(alpha^-1) ~ Ga(1,1).
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.knowceans.arms.ArmSampler
arms, armsSimple
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvGammaArms

public InvGammaArms()
Method Detail

logpdf

public double logpdf(double alpha,
                     java.lang.Object params)
Implements the posterior distribution to p(alpha^-1) ~ Ga(1,1). With topic and observation counts k and n, this yields (Rasmussen 2000): p(alpha|k,n) = C (alpha^(k-3/2) exp(-1 / 2alpha) gamma(alpha)) / Gamma(n+alpha). p(log(alpha)|n,k) is log-concave, which allows ARS, but with ARMS we can use p(alpha|n,k) directly.

Specified by:
logpdf in class ArmSampler
Parameters:
alpha -
params - int[]{number of observations, dimensionality of dirichlet}
Returns:

main

public static void main(java.lang.String[] args)