|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knowceans.dirichlet.lda.LdaMarkovState
public class LdaMarkovState
LdaMarkovState represents the state of the gibbs sampler of the lda process used for estimating unknown documents (word vectors).
| Field Summary | |
|---|---|
int[][] |
nd
n_m,k: nd[m][k] number of words (not terms!) |
int[] |
ndsum
n_m: ndsum[m] total number of words in document m. |
int[][] |
nw
n_k,t: nw[k][t] number of instances of term t assigned to topic k. |
int[] |
nwsum
n_k: nwsum[k] total number of words (not terms!) |
private static long |
serialVersionUID
|
int |
V
V: size of vocabulary. |
int[][] |
w
w_m,n: word vectors of the corpus. |
int[][] |
z
z_m,n: topic assignments z_m,n for each word (= term occurrence). |
| Constructor Summary | |
|---|---|
LdaMarkovState()
Initialise markov state for loading or setting by parameters (subclasses only). |
|
LdaMarkovState(int[][] w,
int V,
int[][] z,
int K)
Initialise the object from the data given. |
|
LdaMarkovState(LdaMarkovState state)
Copy constructor that copies all internal fields from state to this. |
|
LdaMarkovState(java.lang.String ldaBase)
Set up the markov chain from a file. |
|
| Method Summary | |
|---|---|
void |
copyTo(LdaMarkovState cps)
Copy the information contained in this to the fields of the argument object. |
void |
init(int K,
java.util.Random rand)
Random allocation and initialisaton of the state count vectors. |
protected void |
initNd(int M,
int K,
java.util.Random rand)
|
protected void |
initNw(int M,
int K)
|
void |
load(java.lang.String filename)
Load state arrays from file. |
void |
recalculate(int[][] z)
Recalculates the topic statistics from the word-topic associations. |
void |
save(java.lang.String filename)
Save (optionally compressed) file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
public int[][] w
public int V
public int[][] z
public int[][] nw
public int[][] nd
public int[] nwsum
public int[] ndsum
| Constructor Detail |
|---|
public LdaMarkovState()
public LdaMarkovState(java.lang.String ldaBase)
ldaBase - public LdaMarkovState(LdaMarkovState state)
state -
public LdaMarkovState(int[][] w,
int V,
int[][] z,
int K)
w - V - z - K - | Method Detail |
|---|
public void recalculate(int[][] z)
z - public void copyTo(LdaMarkovState cps)
cps - public void load(java.lang.String filename)
file - public void save(java.lang.String filename)
file -
public void init(int K,
java.util.Random rand)
K - rand - hasNw -
protected void initNd(int M,
int K,
java.util.Random rand)
protected void initNw(int M,
int K)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||