org.apache.mahout.clustering.lda
Class LDADriver
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.mahout.common.AbstractJob
org.apache.mahout.clustering.lda.LDADriver
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
public final class LDADriver
- extends AbstractJob
Estimates an LDA model from a corpus of documents, which are SparseVectors of word counts. At each phase,
it outputs a matrix of log probabilities of each topic.
Method Summary |
static LDAState |
createState(org.apache.hadoop.conf.Configuration job)
|
static LDAState |
createState(org.apache.hadoop.conf.Configuration job,
boolean empty)
|
static void |
main(String[] args)
|
double |
run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path output,
int numTopics,
int numWords,
double topicSmoothing,
int maxIterations,
boolean runSequential)
|
int |
run(String[] args)
|
Methods inherited from class org.apache.mahout.common.AbstractJob |
addFlag, addInputOption, addOption, addOption, addOption, addOption, addOutputOption, buildOption, getAnalyzerClassFromOption, getCLIOption, getCombinedTempPath, getGroup, getInputPath, getOption, getOption, getOutputPath, getOutputPath, getTempPath, getTempPath, hasOption, keyFor, maybePut, parseArguments, parseDirectories, prepareJob, prepareJob, prepareJob, setS3SafeCombinedInputPath, shouldRunNextPhase |
Methods inherited from class org.apache.hadoop.conf.Configured |
getConf, setConf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.conf.Configurable |
getConf, setConf |
LDADriver
public LDADriver()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
createState
public static LDAState createState(org.apache.hadoop.conf.Configuration job)
createState
public static LDAState createState(org.apache.hadoop.conf.Configuration job,
boolean empty)
run
public int run(String[] args)
throws IOException,
ClassNotFoundException,
InterruptedException
- Throws:
IOException
ClassNotFoundException
InterruptedException
run
public double run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path output,
int numTopics,
int numWords,
double topicSmoothing,
int maxIterations,
boolean runSequential)
throws IOException,
InterruptedException,
ClassNotFoundException
- Throws:
IOException
InterruptedException
ClassNotFoundException
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.