Documentation of 'cc.mallet.topics.NPTopicModel' Java class
NPTopicModel
cc.mallet.topics

Class NPTopicModel

  • All Implemented Interfaces:
    java.io.Serializable


    public class NPTopicModel
    extends java.lang.Object
    implements java.io.Serializable
    A non-parametric topic model that uses the "minimal path" assumption to reduce bookkeeping.
    See Also:
    Serialized Form
    • Field Detail

      • showTopicsInterval

        public int showTopicsInterval
      • wordsPerTopic

        public int wordsPerTopic
    • Constructor Detail

      • NPTopicModel

        public NPTopicModel(double alpha,
                            double gamma,
                            double beta)
        Parameters:
        alpha - this parameter balances the local document topic counts with the global distribution over topics.
        gamma - this parameter is the weight on a completely new, never-before-seen topic in the global distribution.
        beta - this parameter controls the variability of the topic-word distributions
    • Method Detail

      • setTopicDisplay

        public void setTopicDisplay(int interval,
                                    int n)
      • setRandomSeed

        public void setRandomSeed(int seed)
      • addInstances

        public void addInstances(InstanceList training,
                                 int initialTopics)
      • sample

        public void sample(int iterations)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • topWords

        public java.lang.String topWords(int numWords)
      • printState

        public void printState(java.io.File f)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • printState

        public void printState(java.io.PrintStream out)
      • main

        public static void main(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.