## 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

Field Summary
`static String` `DISTANCE_MEASURE_KEY`
`static String` `MAX_DISTANCE`
`static String` `OUT_TYPE_KEY`
`static String` `SEEDS`
`static String` `SEEDS_PATH_KEY`

Fields inherited from class org.apache.mahout.common.AbstractJob
`argMap, inputFile, inputPath, outputFile, outputPath, tempPath`

Constructor Summary
`VectorDistanceSimilarityJob()`

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`

Field Detail

### 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

Constructor Detail

### VectorDistanceSimilarityJob

    public VectorDistanceSimilarityJob()

Method Detail

### 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.