## org.apache.mahout.clustering.spectral.kmeans
Class SpectralKMeansDriver

    java.lang.Object
      org.apache.hadoop.conf.Configured
          org.apache.mahout.common.AbstractJob
              org.apache.mahout.clustering.spectral.kmeans.SpectralKMeansDriver

All Implemented Interfaces:
  org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

    public class SpectralKMeansDriver

extends AbstractJob

Performs spectral k-means clustering on the top k eigenvectors of the input affinity matrix.

Field Summary
`static int` `BLOCKHEIGHT`
`static int` `OVERSAMPLING`
`static double` `OVERSHOOTMULTIPLIER`
`static int` `POWERITERS`
`static int` `REDUCERS`

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

Constructor Summary
`SpectralKMeansDriver()`

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 output, int numDims, int clusters, DistanceMeasure measure, double convergenceDelta, int maxIterations, org.apache.hadoop.fs.Path tempDir, boolean ssvd)`

`static void`

`run(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path input, org.apache.hadoop.fs.Path output, int numDims, int clusters, DistanceMeasure measure, double convergenceDelta, int maxIterations, org.apache.hadoop.fs.Path tempDir, boolean ssvd, int numReducers, int blockHeight, int oversampling, int poweriters)`
Run the Spectral KMeans clustering on the supplied arguments

`int` `run(String[] arg0)`

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

### OVERSHOOTMULTIPLIER

    public static final double OVERSHOOTMULTIPLIER

See Also:
  Constant Field Values

### REDUCERS

    public static final int REDUCERS

See Also:
  Constant Field Values

### BLOCKHEIGHT

    public static final int BLOCKHEIGHT

See Also:
  Constant Field Values

### OVERSAMPLING

    public static final int OVERSAMPLING

See Also:
  Constant Field Values

### POWERITERS

    public static final int POWERITERS

See Also:
  Constant Field Values

Constructor Detail

### SpectralKMeansDriver

    public SpectralKMeansDriver()

Method Detail

### main

    public static void main(String[] args)
                     throws Exception

  Throws:
    `Exception`

### run

    public int run(String[] arg0)
            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 output,
                           int numDims,
                           int clusters,
                           DistanceMeasure measure,
                           double convergenceDelta,
                           int maxIterations,
                           org.apache.hadoop.fs.Path tempDir,
                           boolean ssvd)
                    throws IOException,
                           InterruptedException,
                           ClassNotFoundException

  Throws:
    `IOException`
    `InterruptedException`
    `ClassNotFoundException`

### run

    public static void run(org.apache.hadoop.conf.Configuration conf,
                           org.apache.hadoop.fs.Path input,
                           org.apache.hadoop.fs.Path output,
                           int numDims,
                           int clusters,
                           DistanceMeasure measure,
                           double convergenceDelta,
                           int maxIterations,
                           org.apache.hadoop.fs.Path tempDir,
                           boolean ssvd,
                           int numReducers,
                           int blockHeight,
                           int oversampling,
                           int poweriters)
                    throws IOException,
                           InterruptedException,
                           ClassNotFoundException

  Run the Spectral KMeans clustering on the supplied arguments

  Parameters:
    `conf` - the Configuration to be used
    `input` - the Path to the input tuples directory
    `output` - the Path to the output directory
    `numDims` - the int number of dimensions of the affinity matrix
    `clusters` - the int number of eigenvectors and thus clusters to produce
    `measure` - the DistanceMeasure for the k-Means calculations
    `convergenceDelta` - the double convergence delta for the k-Means calculations
    `maxIterations` - the int maximum number of iterations for the k-Means calculations
    `tempDir` - Temporary directory for intermediate calculations
    `ssvd` - Flag to indicate the eigensolver to use
    `numReducers` - Number of reducers
    `blockHeight` -
    `oversampling` -
    `poweriters` -
  Throws:
    `IOException`
    `InterruptedException`
    `ClassNotFoundException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.