Class LDAStream

  • All Implemented Interfaces:
    java.io.Serializable

    public class LDAStream
    extends LDAHyper
    Author:
    Limin Yao, David Mimno
    See Also:
    Serialized Form
    • Constructor Detail

      • LDAStream

        public LDAStream​(int numberOfTopics)
        Parameters:
        numberOfTopics -
      • LDAStream

        public LDAStream​(int numberOfTopics,
                         double alphaSum,
                         double beta)
        Parameters:
        numberOfTopics -
        alphaSum -
        beta -
      • LDAStream

        public LDAStream​(int numberOfTopics,
                         double alphaSum,
                         double beta,
                         Randoms random)
        Parameters:
        numberOfTopics -
        alphaSum -
        beta -
        random -
      • LDAStream

        public LDAStream​(LabelAlphabet topicAlphabet,
                         double alphaSum,
                         double beta,
                         Randoms random)
        Parameters:
        topicAlphabet -
        alphaSum -
        beta -
        random -
    • Method Detail

      • inferenceAll

        public void inferenceAll​(int maxIteration)
      • estimateAll

        public void estimateAll​(int iteration)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • inference

        public void inference​(int maxIteration)
        Parameters:
        maxIteration -
      • inferenceOneByOne

        public void inferenceOneByOne​(int maxIteration)
      • inferenceWithTheta

        public void inferenceWithTheta​(int maxIteration,
                                       InstanceList theta)
      • printTheta

        public void printTheta​(java.util.ArrayList<LDAHyper.Topication> dataset,
                               java.io.File f,
                               double threshold,
                               int max)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • printPhi

        public void printPhi​(java.io.File f,
                             double threshold)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • printDocumentTopics

        public void printDocumentTopics​(java.util.ArrayList<LDAHyper.Topication> dataset,
                                        java.io.File f)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • printDocumentTopics

        public void printDocumentTopics​(java.util.ArrayList<LDAHyper.Topication> dataset,
                                        java.io.PrintWriter pw)
      • printDocumentTopics

        public void printDocumentTopics​(java.util.ArrayList<LDAHyper.Topication> dataset,
                                        java.io.PrintWriter pw,
                                        double threshold,
                                        int max)
        Parameters:
        pw - A print writer
        threshold - Only print topics with proportion greater than this number
        max - Print no more than this many topics
      • printState

        public void printState​(java.util.ArrayList<LDAHyper.Topication> dataset,
                               java.io.File f)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • printState

        public void printState​(java.util.ArrayList<LDAHyper.Topication> dataset,
                               java.io.PrintStream out)