org.knowceans.topics.cgen
Class AtmGibbsSampler

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

public class AtmGibbsSampler
extends java.lang.Object

Generated Gibbs sampler for the ATM model. author--topic model, testing abserved nodes Mixture network specification:

 m >> (am[m]) >> x[m][n]
 x[m][n] >> (theta[x] | alpha) >> z[m][n]
 z[m][n] >> (phi[z] | beta) >> w[m][n]
 
 
 elements:
 
 document m
 type: {ROOT|E1SINGLE}
 parents: (root)
 children: am
 range: M
 ----
 doc-author (am[m])
 type: {VISIBLE|SEQUENCE|C1ROOT}
 parents: m
 children: x
 components: am, domain: M, range: am[m].length in A
 counts: nmx, sum: null
 index: m, selector: null
 label node (sparse indexing)
 ----
 author x[m][n]
 type: {HIDDEN|E1SINGLE}
 parents: am
 children: theta
 range: A
 ----
 author-topic (theta[x] | alpha)
 type: {TOPIC|C1ASINGLE}
 parents: x
 children: z
 components: theta, domain: A, range: K
 counts: nxz, sum: nxzsum
 index: x, selector: null
 hyperparams: alpha, dimension 1, fixed: true
 ----
 topic z[m][n]
 type: {HIDDEN|QFIXED|E1SINGLE}
 parents: theta
 children: phi
 range: K
 ----
 topic-word (phi[z] | beta)
 type: {TOPIC|C1ASINGLE}
 parents: z
 children: w
 components: phi, domain: K, range: V
 counts: nzw, sum: nzwsum
 index: z, selector: null
 hyperparams: beta, dimension 1, fixed: true
 ----
 word w[m][n]
 type: {VISIBLE|E1SINGLE}
 parents: phi
 children: (leaf)
 range: V
 ----
 sequences:
 
 words [m][n]
 parent: (root), children: []
 edges: m x z w
 authors [m][j]
 parent: (root), children: []
 edges:
 
 

Author:
gregor heinrich (via MixNetKernelGenerator)

Field Summary
(package private)  int A
           
(package private)  double alpha
           
(package private)  double alphasum
           
(package private)  int[][] am
           
(package private)  int[][] amq
           
(package private)  double beta
           
(package private)  double betasum
           
(package private)  int iter
           
(package private)  int K
           
(package private)  int M
           
(package private)  int Mq
           
(package private)  int niter
           
(package private)  int[][] nxz
           
(package private)  int[] nxzsum
           
(package private)  int[][] nzw
           
(package private)  int[] nzwsum
           
(package private)  double[][] phi
           
(package private)  double[][] pp
           
(package private)  java.util.Random rand
           
(package private)  double[][] theta
           
(package private)  int V
           
(package private)  int[][] w
           
(package private)  int W
           
(package private)  int Wa
           
(package private)  int Waq
           
(package private)  int[][] wq
           
(package private)  int Wq
           
(package private)  int[][] x
           
(package private)  int[][] xq
           
(package private)  int[][] z
           
(package private)  int[][] zq
           
 
Constructor Summary
AtmGibbsSampler(int[][] am, int[][] amq, int Amax, int A, double alpha, int K, double beta, int[][] w, int[][] wq, int V, 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

am

int[][] am

amq

int[][] amq

x

int[][] x

xq

int[][] xq

A

int A

nxz

int[][] nxz

nxzsum

int[] nxzsum

alpha

double alpha

alphasum

double alphasum

theta

double[][] theta

z

int[][] z

zq

int[][] zq

K

int K

nzw

int[][] nzw

nzwsum

int[] nzwsum

beta

double beta

betasum

double betasum

phi

double[][] phi

w

int[][] w

wq

int[][] wq

V

int V

W

int W

Wq

int Wq

Wa

int Wa

Waq

int Waq

pp

double[][] pp
Constructor Detail

AtmGibbsSampler

public AtmGibbsSampler(int[][] am,
                       int[][] amq,
                       int Amax,
                       int A,
                       double alpha,
                       int K,
                       double beta,
                       int[][] w,
                       int[][] wq,
                       int V,
                       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