Package cc.mallet.topics
Class HierarchicalPAM
- java.lang.Object
-
- cc.mallet.topics.HierarchicalPAM
-
public class HierarchicalPAM extends java.lang.Object
Hierarchical PAM, where each node in the DAG has a distribution over all topics on the next level and one additional "node-specific" topic.- Author:
- David Mimno
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.logging.Logger
logger
static int
NUM_LEVELS
static int
ROOT_TOPIC
static int
SUB_TOPIC
static int
SUPER_TOPIC
-
Constructor Summary
Constructors Constructor Description HierarchicalPAM(int superTopics, int subTopics, double superTopicBalance, double subTopicBalance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
estimate(InstanceList documents, InstanceList testing, int numIterations, int showTopicsInterval, int outputModelInterval, int optimizeInterval, java.lang.String outputModelFilename, Randoms r)
static void
main(java.lang.String[] args)
double
modelLogLikelihood()
void
printState(java.io.File f)
void
printState(java.io.PrintWriter out)
java.lang.String
printTopWords(int numWords, boolean useNewLines)
-
-
-
Field Detail
-
logger
protected static java.util.logging.Logger logger
-
NUM_LEVELS
public static final int NUM_LEVELS
- See Also:
- Constant Field Values
-
ROOT_TOPIC
public static final int ROOT_TOPIC
- See Also:
- Constant Field Values
-
SUPER_TOPIC
public static final int SUPER_TOPIC
- See Also:
- Constant Field Values
-
SUB_TOPIC
public static final int SUB_TOPIC
- See Also:
- Constant Field Values
-
-
Method Detail
-
estimate
public void estimate(InstanceList documents, InstanceList testing, int numIterations, int showTopicsInterval, int outputModelInterval, int optimizeInterval, java.lang.String outputModelFilename, Randoms r)
-
printTopWords
public java.lang.String printTopWords(int numWords, boolean useNewLines)
-
printState
public void printState(java.io.File f) throws java.io.IOException
- Throws:
java.io.IOException
-
printState
public void printState(java.io.PrintWriter out)
-
modelLogLikelihood
public double modelLogLikelihood()
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
- Throws:
java.io.IOException
-
-