org.apache.mahout.math.stats.entropy
Class Entropy
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.mahout.common.AbstractJob
org.apache.mahout.math.stats.entropy.Entropy
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
public final class Entropy
- extends AbstractJob
A Hadoop job to compute the entropy of keys or values in a SequenceFile
. Format has to be Text
for
key or value.
- -i The input sequence file
- -o The output sequence file
- -s The source. Can be \ or \. Default is \
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 |
Entropy
public Entropy()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
getNumberItems
public long getNumberItems()
- Returns the number of elements in the file. Only works after run.
- Returns:
- The number of processed items
run
public int run(String[] args)
throws IOException,
ClassNotFoundException,
InterruptedException
- Throws:
IOException
ClassNotFoundException
InterruptedException
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.