cc.mallet.topics
Class LDAStream
- java.lang.Object
-
- cc.mallet.topics.LDAHyper
-
- cc.mallet.topics.LDAStream
-
- All Implemented Interfaces:
- java.io.Serializable
public class LDAStream extends LDAHyper
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class cc.mallet.topics.LDAHyper
LDAHyper.Topication
-
-
Field Summary
-
Fields inherited from class cc.mallet.topics.LDAHyper
burninPeriod, DEFAULT_BETA, iterationsSoFar, numIterations, optimizeInterval, saveSampleInterval, showTopicsInterval, wordsPerTopic
-
-
Constructor Summary
Constructors Constructor and Description LDAStream(int numberOfTopics)LDAStream(int numberOfTopics, double alphaSum, double beta)LDAStream(int numberOfTopics, double alphaSum, double beta, Randoms random)LDAStream(LabelAlphabet topicAlphabet, double alphaSum, double beta, Randoms random)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidestimateAll(int iteration)java.util.ArrayList<LDAHyper.Topication>getTest()voidinference(int maxIteration)voidinferenceAll(int maxIteration)voidinferenceOneByOne(int maxIteration)voidinferenceWithTheta(int maxIteration, InstanceList theta)voidprintDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.File f)voidprintDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.PrintWriter pw)voidprintDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.PrintWriter pw, double threshold, int max)voidprintPhi(java.io.File f, double threshold)voidprintState(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.File f)voidprintState(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.PrintStream out)voidprintTheta(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.File f, double threshold, int max)-
Methods inherited from class cc.mallet.topics.LDAHyper
addInstances, addInstances, empiricalLikelihood, estimate, estimate, getAlphabet, getCountFeatureTopic, getCountTokensPerTopic, getData, getNumTopics, getSortedTopicWords, getTopicAlphabet, main, modelLogLikelihood, printDocumentTopics, printDocumentTopics, printDocumentTopics, printState, printState, printTopWords, printTopWords, read, setBurninPeriod, setModelOutput, setNumIterations, setOptimizeInterval, setRandomSeed, setSaveState, setTestingInstances, setTopicDisplay, topicLabelMutualInformation, topicXMLReport, topicXMLReportPhrases, write
-
-
-
-
Constructor Detail
-
LDAStream
public LDAStream(int numberOfTopics)
- Parameters:
numberOfTopics-
-
LDAStream
public LDAStream(int numberOfTopics, double alphaSum, double beta)- Parameters:
numberOfTopics-alphaSum-beta-
-
LDAStream
public LDAStream(int numberOfTopics, double alphaSum, double beta, Randoms random)- Parameters:
numberOfTopics-alphaSum-beta-random-
-
LDAStream
public LDAStream(LabelAlphabet topicAlphabet, double alphaSum, double beta, Randoms random)
- Parameters:
topicAlphabet-alphaSum-beta-random-
-
-
Method Detail
-
getTest
public java.util.ArrayList<LDAHyper.Topication> getTest()
-
inferenceAll
public void inferenceAll(int maxIteration)
-
estimateAll
public void estimateAll(int iteration) throws java.io.IOException- Throws:
java.io.IOException
-
inference
public void inference(int maxIteration)
- Parameters:
maxIteration-- -
-
inferenceOneByOne
public void inferenceOneByOne(int maxIteration)
-
inferenceWithTheta
public void inferenceWithTheta(int maxIteration, InstanceList theta)
-
printTheta
public void printTheta(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.File f, double threshold, int max) throws java.io.IOException
- Throws:
java.io.IOException
-
printPhi
public void printPhi(java.io.File f, double threshold) throws java.io.IOException- Throws:
java.io.IOException
-
printDocumentTopics
public void printDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
printDocumentTopics
public void printDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.PrintWriter pw)
-
printDocumentTopics
public void printDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.PrintWriter pw, double threshold, int max)
- 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.util.ArrayList<LDAHyper.Topication> dataset, java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
printState
public void printState(java.util.ArrayList<LDAHyper.Topication> dataset, java.io.PrintStream out)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG