cc.mallet.topics
Class MarginalProbEstimator
java.lang.Object
cc.mallet.topics.MarginalProbEstimator
- All Implemented Interfaces:
- java.io.Serializable
public class MarginalProbEstimator
- extends java.lang.Object
- implements java.io.Serializable
An implementation of topic model marginal probability estimators
presented in Wallach et al., "Evaluation Methods for Topic Models", ICML (2009)
- Author:
- David Mimno
- See Also:
- Serialized Form
Constructor Summary |
MarginalProbEstimator(int numTopics,
double[] alpha,
double alphaSum,
double beta,
int[][] typeTopicCounts,
int[] tokensPerTopic)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numTopics
protected int numTopics
topicMask
protected int topicMask
topicBits
protected int topicBits
alpha
protected double[] alpha
alphaSum
protected double alphaSum
beta
protected double beta
betaSum
protected double betaSum
smoothingOnlyMass
protected double smoothingOnlyMass
cachedCoefficients
protected double[] cachedCoefficients
typeTopicCounts
protected int[][] typeTopicCounts
tokensPerTopic
protected int[] tokensPerTopic
random
protected Randoms random
MarginalProbEstimator
public MarginalProbEstimator(int numTopics,
double[] alpha,
double alphaSum,
double beta,
int[][] typeTopicCounts,
int[] tokensPerTopic)
getTokensPerTopic
public int[] getTokensPerTopic()
getTypeTopicCounts
public int[][] getTypeTopicCounts()
evaluateLeftToRight
public double evaluateLeftToRight(InstanceList testing,
int numParticles,
boolean usingResampling,
java.io.PrintStream docProbabilityStream)
leftToRight
protected double[] leftToRight(FeatureSequence tokenSequence,
boolean usingResampling)
read
public static MarginalProbEstimator read(java.io.File f)
throws java.lang.Exception
- Throws:
java.lang.Exception