org.knowceans.topics.cgen
Class LdaGibbsSampler
java.lang.Object
org.knowceans.topics.cgen.LdaGibbsSampler
public class LdaGibbsSampler
- extends java.lang.Object
Generated Gibbs sampler for the LDA model.
Mixture network specification:
m >> (theta[m] | alpha) >> z[m][n]
z[m][n] >> (phi[z] | beta) >> w[m][n]
elements:
document m
type: {ROOT|E1SINGLE}
parents: (root)
children: theta
range: M
----
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
----
topic z[m][n]
type: {HIDDEN|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, index: z, selector: null
hyperparams: beta, dimension 1, fixed: false
----
word w[m][n]
type: {VISIBLE|E1SINGLE}
parents: phi
children: (leaf)
range: V
----
sequences:
words [m][n]
parent: (root), children: []
edges: m z w
- Author:
- gregor heinrich (via MixNetKernelGenerator)
Field Summary |
(package private) double |
alpha
|
(package private) double |
alphasum
|
(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[][] |
nmz
|
(package private) int[][] |
nmzq
|
(package private) int[][] |
nzw
|
(package private) int[] |
nzwsum
|
(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[][] |
z
|
(package private) int[][] |
zq
|
Constructor Summary |
LdaGibbsSampler(double alpha,
int K,
double beta,
int[][] w,
int[][] wq,
int V,
java.util.Random rand)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
rand
java.util.Random rand
iter
int iter
niter
int niter
M
int M
Mq
int Mq
nmz
int[][] nmz
nmzq
int[][] nmzq
alpha
double alpha
alphasum
double alphasum
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
pp
double[] pp
LdaGibbsSampler
public LdaGibbsSampler(double alpha,
int K,
double beta,
int[][] w,
int[][] wq,
int V,
java.util.Random rand)
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