|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprobabilisticmodels.HierLDAGibbs
public class HierLDAGibbs
Estimate word assignements in leaf topics and topic assignements in super topics from a corpus of documents. The method is based on Gibbs sampling.
| Field Summary | |
|---|---|
protected double |
alpha
|
protected double |
beta
|
protected probabilisticmodels.Matrix2D |
documentTermMatrix
|
protected probabilisticmodels.Matrix2D[] |
documentTopicMatrixPerLevel
|
protected probabilisticmodels.Matrix2D |
leafTopicTermMatrix
|
protected int |
numOfLevels
|
protected NotificationListener |
ProgressIndicator
A NotificationListener that would expect a double number as oParams object. |
protected probabilisticmodels.Matrix2D[] |
topicAboveTopicMatrixPerLevel
|
| Constructor Summary | |
|---|---|
HierLDAGibbs(int iNumOfLevels,
int[][] iaDocTermMatrix,
double dAlpha,
double dBeta)
Constructor method: Creates a new instance of HierLDAGibbs |
|
| Method Summary | |
|---|---|
Distribution |
calcTopicProbsUnderSuperTopic(int iTopicsLevel,
int iSuperTopicIndex)
|
int |
generateNextLeafTopic()
Returns the index of the next leaf topic, following the generative process defined by the model. |
java.util.List |
generateText(int iMeanSize)
Generates a text (i.e. |
int |
getDocumentCount()
Get the number of documents in the corpus |
int |
getNumOfLevels()
|
Distribution |
getTopicTermDistro(int iLevel,
int iTopicNumber)
|
int |
getVocabularySize()
Get the vocabulary size |
static void |
main(java.lang.String[] args)
|
void |
performGibbs(int iIterations,
int iBurnIn,
int iThreads)
|
java.lang.String |
printoutNormalizedTopicTerms(int iLevel,
int iTopicNumber,
int iFirstNWords,
java.util.Map<java.lang.Integer,java.lang.String> mTermNumToTerm)
|
java.lang.String |
printoutTopicTerms(int iLevel,
int iTopicNumber,
int iFirstNWords,
java.util.Map<java.lang.Integer,java.lang.String> mTermNumToTerm)
|
void |
setProgressIndicator(NotificationListener ProgressIndicator)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected probabilisticmodels.Matrix2D documentTermMatrix
protected probabilisticmodels.Matrix2D[] documentTopicMatrixPerLevel
protected probabilisticmodels.Matrix2D[] topicAboveTopicMatrixPerLevel
protected probabilisticmodels.Matrix2D leafTopicTermMatrix
protected int numOfLevels
protected double alpha
protected double beta
protected NotificationListener ProgressIndicator
| Constructor Detail |
|---|
public HierLDAGibbs(int iNumOfLevels,
int[][] iaDocTermMatrix,
double dAlpha,
double dBeta)
iNumOfLevels - number of levels of the hierarchyiaDocTermMatrix - the document - term matrix (the input)dAlpha - the Dirichlet parameter alphadBeta - the Dirichlet parameter beta| Method Detail |
|---|
public final int getVocabularySize()
public final int getDocumentCount()
public void performGibbs(int iIterations,
int iBurnIn,
int iThreads)
public java.lang.String printoutTopicTerms(int iLevel,
int iTopicNumber,
int iFirstNWords,
java.util.Map<java.lang.Integer,java.lang.String> mTermNumToTerm)
public Distribution getTopicTermDistro(int iLevel,
int iTopicNumber)
public java.lang.String printoutNormalizedTopicTerms(int iLevel,
int iTopicNumber,
int iFirstNWords,
java.util.Map<java.lang.Integer,java.lang.String> mTermNumToTerm)
public Distribution calcTopicProbsUnderSuperTopic(int iTopicsLevel,
int iSuperTopicIndex)
public final int generateNextLeafTopic()
public java.util.List generateText(int iMeanSize)
iMeanSize - The mean text length in terms.
public static void main(java.lang.String[] args)
public int getNumOfLevels()
public void setProgressIndicator(NotificationListener ProgressIndicator)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||