cc.mallet.topics
Class TopicModelDiagnostics

java.lang.Object
  extended by cc.mallet.topics.TopicModelDiagnostics

public class TopicModelDiagnostics
extends java.lang.Object


Nested Class Summary
 class TopicModelDiagnostics.TopicScores
           
 
Field Summary
static double[] DEFAULT_DOC_PROPORTIONS
           
static int FIFTY_PERCENT_INDEX
           
static int TWO_PERCENT_INDEX
           
 
Constructor Summary
TopicModelDiagnostics(ParallelTopicModel model, int numTopWords)
           
 
Method Summary
 void collectDocumentStatistics()
           
 int[][] getCodocumentMatrix(int topic)
           
 TopicModelDiagnostics.TopicScores getCoherence()
           
 TopicModelDiagnostics.TopicScores getDistanceFromCorpus()
          Low-quality topics may be very similar to the global distribution.
 TopicModelDiagnostics.TopicScores getDistanceFromUniform()
           
 TopicModelDiagnostics.TopicScores getDocumentEntropy(int[] tokensPerTopic)
           
 TopicModelDiagnostics.TopicScores getDocumentPercent(int i)
           
 TopicModelDiagnostics.TopicScores getDocumentPercentRatio(int numeratorIndex, int denominatorIndex)
           
 TopicModelDiagnostics.TopicScores getEffectiveNumberOfWords()
           
 TopicModelDiagnostics.TopicScores getRank1Percent()
           
 TopicModelDiagnostics.TopicScores getTokenDocumentDiscrepancies()
           
 TopicModelDiagnostics.TopicScores getTokensPerTopic(int[] tokensPerTopic)
           
 TopicModelDiagnostics.TopicScores getWordLengthScores()
          Low-quality topics often have lots of unusually short words.
 TopicModelDiagnostics.TopicScores getWordLengthStandardDeviation()
          Low-quality topics often have lots of unusually short words.
static void main(java.lang.String[] args)
           
 java.lang.String toString()
           
 java.lang.String toXML()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TWO_PERCENT_INDEX

public static final int TWO_PERCENT_INDEX
See Also:
Constant Field Values

FIFTY_PERCENT_INDEX

public static final int FIFTY_PERCENT_INDEX
See Also:
Constant Field Values

DEFAULT_DOC_PROPORTIONS

public static final double[] DEFAULT_DOC_PROPORTIONS
Constructor Detail

TopicModelDiagnostics

public TopicModelDiagnostics(ParallelTopicModel model,
                             int numTopWords)
Method Detail

collectDocumentStatistics

public void collectDocumentStatistics()

getCodocumentMatrix

public int[][] getCodocumentMatrix(int topic)

getTokensPerTopic

public TopicModelDiagnostics.TopicScores getTokensPerTopic(int[] tokensPerTopic)

getDocumentEntropy

public TopicModelDiagnostics.TopicScores getDocumentEntropy(int[] tokensPerTopic)

getDistanceFromUniform

public TopicModelDiagnostics.TopicScores getDistanceFromUniform()

getEffectiveNumberOfWords

public TopicModelDiagnostics.TopicScores getEffectiveNumberOfWords()

getDistanceFromCorpus

public TopicModelDiagnostics.TopicScores getDistanceFromCorpus()
Low-quality topics may be very similar to the global distribution.


getTokenDocumentDiscrepancies

public TopicModelDiagnostics.TopicScores getTokenDocumentDiscrepancies()

getWordLengthScores

public TopicModelDiagnostics.TopicScores getWordLengthScores()
Low-quality topics often have lots of unusually short words.


getWordLengthStandardDeviation

public TopicModelDiagnostics.TopicScores getWordLengthStandardDeviation()
Low-quality topics often have lots of unusually short words.


getCoherence

public TopicModelDiagnostics.TopicScores getCoherence()

getRank1Percent

public TopicModelDiagnostics.TopicScores getRank1Percent()

getDocumentPercentRatio

public TopicModelDiagnostics.TopicScores getDocumentPercentRatio(int numeratorIndex,
                                                                 int denominatorIndex)

getDocumentPercent

public TopicModelDiagnostics.TopicScores getDocumentPercent(int i)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toXML

public java.lang.String toXML()

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception