cc.mallet.topics
Class LDAHyper
- java.lang.Object
-
- cc.mallet.topics.LDAHyper
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- LDAStream
Deprecated.Use ParallelTopicModel instead, which uses substantially faster data structures even for non-parallel operation.
public class LDAHyper extends java.lang.Object implements java.io.SerializableLatent Dirichlet Allocation with optimized hyperparameters- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classLDAHyper.TopicationDeprecated.
-
Field Summary
Fields Modifier and Type Field and Description intburninPeriodDeprecated.static doubleDEFAULT_BETADeprecated.intiterationsSoFarDeprecated.intnumIterationsDeprecated.intoptimizeIntervalDeprecated.intsaveSampleIntervalDeprecated.intshowTopicsIntervalDeprecated.intwordsPerTopicDeprecated.
-
Constructor Summary
Constructors Constructor and Description LDAHyper(int numberOfTopics)Deprecated.LDAHyper(int numberOfTopics, double alphaSum, double beta)Deprecated.LDAHyper(int numberOfTopics, double alphaSum, double beta, Randoms random)Deprecated.LDAHyper(LabelAlphabet topicAlphabet, double alphaSum, double beta, Randoms random)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidaddInstances(InstanceList training)Deprecated.voidaddInstances(InstanceList training, java.util.List<LabelSequence> topics)Deprecated.doubleempiricalLikelihood(int numSamples, InstanceList testing)Deprecated.voidestimate()Deprecated.voidestimate(int iterationsThisRound)Deprecated.AlphabetgetAlphabet()Deprecated.intgetCountFeatureTopic(int featureIndex, int topicIndex)Deprecated.intgetCountTokensPerTopic(int topicIndex)Deprecated.java.util.ArrayList<LDAHyper.Topication>getData()Deprecated.intgetNumTopics()Deprecated.IDSorter[]getSortedTopicWords(int topic)Deprecated.LabelAlphabetgetTopicAlphabet()Deprecated.static voidmain(java.lang.String[] args)Deprecated.doublemodelLogLikelihood()Deprecated.voidprintDocumentTopics(java.io.File f)Deprecated.voidprintDocumentTopics(java.io.PrintWriter pw)Deprecated.voidprintDocumentTopics(java.io.PrintWriter pw, double threshold, int max)Deprecated.voidprintState(java.io.File f)Deprecated.voidprintState(java.io.PrintStream out)Deprecated.voidprintTopWords(java.io.File file, int numWords, boolean useNewLines)Deprecated.voidprintTopWords(java.io.PrintStream out, int numWords, boolean usingNewLines)Deprecated.static LDAHyperread(java.io.File f)Deprecated.voidsetBurninPeriod(int burninPeriod)Deprecated.voidsetModelOutput(int interval, java.lang.String filename)Deprecated.voidsetNumIterations(int numIterations)Deprecated.voidsetOptimizeInterval(int interval)Deprecated.voidsetRandomSeed(int seed)Deprecated.voidsetSaveState(int interval, java.lang.String filename)Deprecated.Define how often and where to save the statevoidsetTestingInstances(InstanceList testing)Deprecated.Held-out instances for empirical likelihood calculationvoidsetTopicDisplay(int interval, int n)Deprecated.doubletopicLabelMutualInformation()Deprecated.voidtopicXMLReport(java.io.PrintWriter out, int numWords)Deprecated.voidtopicXMLReportPhrases(java.io.PrintStream out, int numWords)Deprecated.voidwrite(java.io.File f)Deprecated.
-
-
-
Field Detail
-
DEFAULT_BETA
public static final double DEFAULT_BETA
Deprecated.- See Also:
- Constant Field Values
-
iterationsSoFar
public int iterationsSoFar
Deprecated.
-
numIterations
public int numIterations
Deprecated.
-
burninPeriod
public int burninPeriod
Deprecated.
-
saveSampleInterval
public int saveSampleInterval
Deprecated.
-
optimizeInterval
public int optimizeInterval
Deprecated.
-
showTopicsInterval
public int showTopicsInterval
Deprecated.
-
wordsPerTopic
public int wordsPerTopic
Deprecated.
-
-
Constructor Detail
-
LDAHyper
public LDAHyper(int numberOfTopics)
Deprecated.
-
LDAHyper
public LDAHyper(int numberOfTopics, double alphaSum, double beta)Deprecated.
-
LDAHyper
public LDAHyper(int numberOfTopics, double alphaSum, double beta, Randoms random)Deprecated.
-
LDAHyper
public LDAHyper(LabelAlphabet topicAlphabet, double alphaSum, double beta, Randoms random)
Deprecated.
-
-
Method Detail
-
getAlphabet
public Alphabet getAlphabet()
Deprecated.
-
getTopicAlphabet
public LabelAlphabet getTopicAlphabet()
Deprecated.
-
getNumTopics
public int getNumTopics()
Deprecated.
-
getData
public java.util.ArrayList<LDAHyper.Topication> getData()
Deprecated.
-
getCountFeatureTopic
public int getCountFeatureTopic(int featureIndex, int topicIndex)Deprecated.
-
getCountTokensPerTopic
public int getCountTokensPerTopic(int topicIndex)
Deprecated.
-
setTestingInstances
public void setTestingInstances(InstanceList testing)
Deprecated.Held-out instances for empirical likelihood calculation
-
setNumIterations
public void setNumIterations(int numIterations)
Deprecated.
-
setBurninPeriod
public void setBurninPeriod(int burninPeriod)
Deprecated.
-
setTopicDisplay
public void setTopicDisplay(int interval, int n)Deprecated.
-
setRandomSeed
public void setRandomSeed(int seed)
Deprecated.
-
setOptimizeInterval
public void setOptimizeInterval(int interval)
Deprecated.
-
setModelOutput
public void setModelOutput(int interval, java.lang.String filename)Deprecated.
-
setSaveState
public void setSaveState(int interval, java.lang.String filename)Deprecated.Define how often and where to save the state- Parameters:
interval- Save a copy of the state everyintervaliterations.filename- Save the state to this file, with the iteration number as a suffix
-
addInstances
public void addInstances(InstanceList training)
Deprecated.
-
addInstances
public void addInstances(InstanceList training, java.util.List<LabelSequence> topics)
Deprecated.
-
estimate
public void estimate() throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
estimate
public void estimate(int iterationsThisRound) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
getSortedTopicWords
public IDSorter[] getSortedTopicWords(int topic)
Deprecated.
-
printTopWords
public void printTopWords(java.io.File file, int numWords, boolean useNewLines) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
printTopWords
public void printTopWords(java.io.PrintStream out, int numWords, boolean usingNewLines)Deprecated.
-
topicXMLReport
public void topicXMLReport(java.io.PrintWriter out, int numWords)Deprecated.
-
topicXMLReportPhrases
public void topicXMLReportPhrases(java.io.PrintStream out, int numWords)Deprecated.
-
printDocumentTopics
public void printDocumentTopics(java.io.File f) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
printDocumentTopics
public void printDocumentTopics(java.io.PrintWriter pw)
Deprecated.
-
printDocumentTopics
public void printDocumentTopics(java.io.PrintWriter pw, double threshold, int max)Deprecated.- Parameters:
pw- A print writerthreshold- Only print topics with proportion greater than this numbermax- Print no more than this many topics
-
printState
public void printState(java.io.File f) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
printState
public void printState(java.io.PrintStream out)
Deprecated.
-
write
public void write(java.io.File f)
Deprecated.
-
read
public static LDAHyper read(java.io.File f)
Deprecated.
-
topicLabelMutualInformation
public double topicLabelMutualInformation()
Deprecated.
-
empiricalLikelihood
public double empiricalLikelihood(int numSamples, InstanceList testing)Deprecated.
-
modelLogLikelihood
public double modelLogLikelihood()
Deprecated.
-
main
public static void main(java.lang.String[] args) throws java.io.IOExceptionDeprecated.- Throws:
java.io.IOException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG