org.apache.mahout.math.hadoop.similarity
Class VectorDistanceSimilarityJob
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.mahout.common.AbstractJob
org.apache.mahout.math.hadoop.similarity.VectorDistanceSimilarityJob
- All Implemented Interfaces:
- org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
public class VectorDistanceSimilarityJob
- extends AbstractJob
This class does a Map-side join between seed vectors (the map side can also be a Cluster) and a list of other vectors
and emits the a tuple of seed id, other id, distance. It is a more generic version of KMean's mapper
Method Summary |
static void |
main(String[] args)
|
static void |
run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path seeds,
org.apache.hadoop.fs.Path output,
DistanceMeasure measure,
String outType)
|
static void |
run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path seeds,
org.apache.hadoop.fs.Path output,
DistanceMeasure measure,
String outType,
Double maxDistance)
|
int |
run(String[] args)
|
Methods inherited from class org.apache.mahout.common.AbstractJob |
addFlag, addInputOption, addOption, addOption, addOption, addOption, addOutputOption, buildOption, buildOption, getAnalyzerClassFromOption, getCLIOption, getConf, getDimensions, getFloat, getFloat, getGroup, getInputFile, getInputPath, getInt, getInt, getOption, getOption, getOption, getOptions, getOutputFile, getOutputPath, getOutputPath, getTempPath, getTempPath, hasOption, keyFor, maybePut, parseArguments, parseArguments, parseDirectories, prepareJob, prepareJob, prepareJob, prepareJob, setConf, setS3SafeCombinedInputPath, shouldRunNextPhase |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEEDS
public static final String SEEDS
- See Also:
- Constant Field Values
SEEDS_PATH_KEY
public static final String SEEDS_PATH_KEY
- See Also:
- Constant Field Values
DISTANCE_MEASURE_KEY
public static final String DISTANCE_MEASURE_KEY
- See Also:
- Constant Field Values
OUT_TYPE_KEY
public static final String OUT_TYPE_KEY
- See Also:
- Constant Field Values
MAX_DISTANCE
public static final String MAX_DISTANCE
- See Also:
- Constant Field Values
VectorDistanceSimilarityJob
public VectorDistanceSimilarityJob()
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
run
public int run(String[] args)
throws Exception
- Throws:
Exception
run
public static void run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path seeds,
org.apache.hadoop.fs.Path output,
DistanceMeasure measure,
String outType)
throws IOException,
ClassNotFoundException,
InterruptedException
- Throws:
IOException
ClassNotFoundException
InterruptedException
run
public static void run(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path input,
org.apache.hadoop.fs.Path seeds,
org.apache.hadoop.fs.Path output,
DistanceMeasure measure,
String outType,
Double maxDistance)
throws IOException,
ClassNotFoundException,
InterruptedException
- Throws:
IOException
ClassNotFoundException
InterruptedException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.