cc.mallet.topics
Class DMRInferencer
- java.lang.Object
-
- cc.mallet.topics.TopicInferencer
-
- cc.mallet.topics.DMRInferencer
-
- All Implemented Interfaces:
- java.io.Serializable
public class DMRInferencer extends TopicInferencer implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description DMRInferencer(int[][] typeTopicCounts, int[] tokensPerTopic, MaxEnt dmrParameters, Alphabet alphabet, double beta, double betaSum)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getSampledDistribution(Instance instance, int numIterations, int thinning, int burnIn)Use Gibbs sampling to infer a topic distribution.static DMRInferencerread(java.io.File f)-
Methods inherited from class cc.mallet.topics.TopicInferencer
setRandomSeed, writeInferredDistributions
-
-
-
-
Method Detail
-
getSampledDistribution
public double[] getSampledDistribution(Instance instance, int numIterations, int thinning, int burnIn)
Description copied from class:TopicInferencerUse Gibbs sampling to infer a topic distribution. Topics are initialized to the (or a) most probable topic for each token. Using zero iterations returns exactly this initial topic distribution. This code does not adjust type-topic counts: P(w|t) is clamped.- Overrides:
getSampledDistributionin classTopicInferencer
-
read
public static DMRInferencer read(java.io.File f) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
DataMelt 3.0 © DataMelt by jWork.ORG