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
- Author:
- Limin Yao, David Mimno
- See Also:
- Serialized Form
Fields inherited from class cc.mallet.topics.LDAHyper |
alpha, alphabet, alphaSum, beta, betaSum, burninPeriod, cachedCoefficients, data, DEFAULT_BETA, docLengthCounts, formatter, iterationsSoFar, numIterations, numTopics, numTypes, oneDocTopicCounts, optimizeInterval, outputModelFilename, outputModelInterval, printLogLikelihood, random, saveSampleInterval, saveStateInterval, showTopicsInterval, smoothingOnlyMass, stateFilename, testing, tokensPerTopic, topicAlphabet, topicDocCounts, typeTopicCounts, wordsPerTopic |
Method Summary |
void |
estimateAll(int iteration)
|
java.util.ArrayList<LDAHyper.Topication> |
getTest()
|
void |
inference(int maxIteration)
|
void |
inferenceAll(int maxIteration)
|
void |
inferenceOneByOne(int maxIteration)
|
void |
inferenceWithTheta(int maxIteration,
InstanceList theta)
|
void |
printDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset,
java.io.File f)
|
void |
printDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset,
java.io.PrintWriter pw)
|
void |
printDocumentTopics(java.util.ArrayList<LDAHyper.Topication> dataset,
java.io.PrintWriter pw,
double threshold,
int max)
|
void |
printPhi(java.io.File f,
double threshold)
|
void |
printState(java.util.ArrayList<LDAHyper.Topication> dataset,
java.io.File f)
|
void |
printState(java.util.ArrayList<LDAHyper.Topication> dataset,
java.io.PrintStream out)
|
void |
printTheta(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, initializeHistogramsAndCachedValues, instanceLength, main, modelLogLikelihood, printDocumentTopics, printDocumentTopics, printDocumentTopics, printState, printState, printTopWords, printTopWords, read, sampleTopicsForOneDoc, setBurninPeriod, setModelOutput, setNumIterations, setOptimizeInterval, setRandomSeed, setSaveState, setTestingInstances, setTopicDisplay, topicLabelMutualInformation, topicXMLReport, topicXMLReportPhrases, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
test
protected java.util.ArrayList<LDAHyper.Topication> test
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
-
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)