| Modifier and Type | Field and Description |
|---|---|
double |
alpha
the dirichelet perameter for every dimension of the topic multinomial prior
|
int |
ntopics
number of topics
|
double[] |
topicTotal
The maximum likelihood sufficient statistics for estimation of Beta.
|
double[][] |
topicWord
The maximum likelihood sufficient statistics for estimation of Beta.
|
| Constructor and Description |
|---|
LDAModel(int ntopics) |
| Modifier and Type | Method and Description |
|---|---|
void |
incTopicTotal(int topicIndex,
double d)
Increment a topic and word index by d.
|
void |
incTopicWord(int topicIndex,
int wordIndex,
double d)
Increment a topic and word index by d.
|
LDAModel |
newInstance()
This method also swaps the likelihoods (i.e.
|
void |
prepare(Corpus corpus)
initialises the sufficient statistic holder based on ntopics and
the
Corpus.vocabularySize(). |
void |
prepare(int vocabularySize)
initialises the sufficient statistic holder based on ntopics and
the vocabularySize.
|
void |
setAlpha(double initialAlpha) |
public double alpha
public double[][] topicWord
public double[] topicTotal
public int ntopics
public LDAModel(int ntopics)
ntopics - the number of topics in this LDA modelpublic void prepare(Corpus corpus)
Corpus.vocabularySize(). Alpha remains at 0corpus - public void prepare(int vocabularySize)
vocabularySize - public void incTopicWord(int topicIndex, int wordIndex, double d)
topicIndex - wordIndex - d - public void incTopicTotal(int topicIndex, double d)
topicIndex - d - public void setAlpha(double initialAlpha)
initialAlpha - the alpha parameter for the topic multinomial dirichelet priorpublic LDAModel newInstance()