Class DMRInferencer

  • All Implemented Interfaces:

    public class DMRInferencer
    extends TopicInferencer
    See Also:
    Serialized Form
    • Field Detail

      • dmrParameters

        protected MaxEnt dmrParameters
      • numFeatures

        protected int numFeatures
      • defaultFeatureIndex

        protected int defaultFeatureIndex
    • Constructor Detail

      • DMRInferencer

        public DMRInferencer​(int[][] typeTopicCounts,
                             int[] tokensPerTopic,
                             MaxEnt dmrParameters,
                             Alphabet alphabet,
                             double beta,
                             double betaSum)
    • Method Detail

      • getSampledDistribution

        public double[] getSampledDistribution​(Instance instance,
                                               int numIterations,
                                               int thinning,
                                               int burnIn)
        Description copied from class: TopicInferencer
        Use 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.

        getSampledDistribution in class TopicInferencer
      • read

        public static DMRInferencer read​( f)
                                  throws java.lang.Exception