Class DMRInferencer

  • All Implemented Interfaces:
    java.io.Serializable

    public class DMRInferencer
    extends TopicInferencer
    implements java.io.Serializable
    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.

        Overrides:
        getSampledDistribution in class TopicInferencer
      • read

        public static DMRInferencer read​(java.io.File f)
                                  throws java.lang.Exception
        Throws:
        java.lang.Exception