org.knowceans.topics.cgen
Class PamGibbsSampler

java.lang.Object
  extended by org.knowceans.topics.cgen.PamGibbsSampler

public class PamGibbsSampler
extends java.lang.Object

Generated Gibbs sampler for the PAM model. Mixture network specification:

 mixnet: PAM
 PAM baseline model.
 Compiles and runs ok.
 
 structure:
 
 m >> (theta[m] | alpha) >> z[m][n]
 m, z[m][n] >> (thetax[m,z] | gamma[z]) >> y[m][n]
 m, y[m][n] >> (thetay[m,y] | delta[y]) >> x[m][n]
 x[m][n] >> (phi[x] | beta) >> w[m][n]
 
 
 elements:
 
 m:
 document m
 type: {ROOT|E3COUPLED}
 parents: (root)
 children: theta thetax thetay
 range: M
 
 (thetay[m,y] | delta[y]):
 topic-topic (thetay[m,y] | delta[y])
 type: {SEQUENCE|C1BSEQADD}
 parents: m y
 children: x
 components: thetay, domain: M *  L, range: J, index: my, selector: m,y
 hyperparams: delta, dimension: L * J, selector: y, fixed: false
 
 x[m][n]:
 topic x[m][n]
 type: {HIDDEN|E1SINGLE}
 parents: thetay
 children: phi
 range: J
 
 (phi[x] | beta):
 topic-word (phi[x] | beta)
 type: {TOPIC|C1ASINGLE}
 parents: x
 children: w
 components: phi, domain: J, range: V, index: x, selector: null
 hyperparams: beta, dimension 1, fixed: false
 
 w[m][n]:
 word w[m][n]
 type: {VISIBLE|E1SINGLE}
 parents: phi
 children: (leaf)
 range: V
 
 (thetax[m,z] | gamma[z]):
 topic-topic (thetax[m,z] | gamma[z])
 type: {SEQUENCE|C1BSEQADD}
 parents: m z
 children: y
 components: thetax, domain: M *  K, range: L, index: mz, selector: m,z
 hyperparams: gamma, dimension: K * L, selector: z, fixed: false
 
 y[m][n]:
 topic y[m][n]
 type: {HIDDEN|E1SINGLE}
 parents: thetax
 children: thetay
 range: L
 
 (theta[m] | alpha):
 doc-topic (theta[m] | alpha)
 type: {SEQUENCE|C1ROOT}
 parents: m
 children: z
 components: theta, domain: M, range: K, index: m, selector: null
 hyperparams: alpha, dimension 1, fixed: false
 
 z[m][n]:
 topic z[m][n]
 type: {HIDDEN|E1SINGLE}
 parents: theta
 children: thetax
 range: K
 
 sequences:
 
 words [m][n]
 parent: (root), children: []
 edges: m z y x w
 
 


Field Summary
(package private)  double alpha
           
(package private)  double alphasum
           
(package private)  double beta
           
(package private)  double betasum
           
(package private)  double[][] delta
           
(package private)  double[] deltasum
           
(package private)  double[][] gamma
           
(package private)  double[] gammasum
           
(package private)  int iter
           
(package private)  int J
           
(package private)  int K
           
(package private)  int L
           
(package private)  int M
           
(package private)  int Mq
           
(package private)  int myjsel
           
(package private)  int mysel
           
(package private)  int mzjsel
           
(package private)  int mzsel
           
(package private)  int niter
           
(package private)  int[][] nmyx
           
(package private)  int[][] nmyxq
           
(package private)  int[] nmyxsum
           
(package private)  int[] nmyxsumq
           
(package private)  int[][] nmz
           
(package private)  int[][] nmzq
           
(package private)  int[][] nmzy
           
(package private)  int[][] nmzyq
           
(package private)  int[] nmzysum
           
(package private)  int[] nmzysumq
           
(package private)  int[][] nxw
           
(package private)  int[] nxwsum
           
(package private)  double[][] phi
           
(package private)  double[][][] pp
           
(package private)  java.util.Random rand
           
(package private)  int V
           
(package private)  int[][] w
           
(package private)  int W
           
(package private)  int[][] wq
           
(package private)  int Wq
           
(package private)  int[][] x
           
(package private)  int[][] xq
           
(package private)  int[][] y
           
(package private)  int[][] yq
           
(package private)  int[][] z
           
(package private)  int[][] zq
           
 
Constructor Summary
PamGibbsSampler(double delta, int J, double beta, int[][] w, int[][] wq, int V, double gamma, int L, double alpha, int K, java.util.Random rand)
           
 
Method Summary
 void estAlpha()
           
 void init()
           
 void initq()
           
static void main(java.lang.String[] args)
           
 double ppx()
           
 void run(int niter)
           
 void runq(int niterq)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rand

java.util.Random rand

iter

int iter

niter

int niter

M

int M

Mq

int Mq

nmyx

int[][] nmyx

nmyxq

int[][] nmyxq

nmyxsum

int[] nmyxsum

nmyxsumq

int[] nmyxsumq

delta

double[][] delta

deltasum

double[] deltasum

x

int[][] x

xq

int[][] xq

J

int J

nxw

int[][] nxw

nxwsum

int[] nxwsum

beta

double beta

betasum

double betasum

phi

double[][] phi

w

int[][] w

wq

int[][] wq

V

int V

nmzy

int[][] nmzy

nmzyq

int[][] nmzyq

nmzysum

int[] nmzysum

nmzysumq

int[] nmzysumq

gamma

double[][] gamma

gammasum

double[] gammasum

y

int[][] y

yq

int[][] yq

L

int L

nmz

int[][] nmz

nmzq

int[][] nmzq

alpha

double alpha

alphasum

double alphasum

z

int[][] z

zq

int[][] zq

K

int K

W

int W

Wq

int Wq

mzsel

int mzsel

mzjsel

int mzjsel

mysel

int mysel

myjsel

int myjsel

pp

double[][][] pp
Constructor Detail

PamGibbsSampler

public PamGibbsSampler(double delta,
                       int J,
                       double beta,
                       int[][] w,
                       int[][] wq,
                       int V,
                       double gamma,
                       int L,
                       double alpha,
                       int K,
                       java.util.Random rand)
Method Detail

main

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

init

public void init()

initq

public void initq()

run

public void run(int niter)

runq

public void runq(int niterq)

estAlpha

public void estAlpha()

ppx

public double ppx()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object