org.apache.mahout.clustering.classify
Class ClusterClassificationMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.WritableComparable<?>,VectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
      extended by org.apache.mahout.clustering.classify.ClusterClassificationMapper

public class ClusterClassificationMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.WritableComparable<?>,VectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>

Mapper for classifying vectors into clusters.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
ClusterClassificationMapper()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.WritableComparable<?> key, VectorWritable vw, org.apache.hadoop.mapreduce.Mapper.Context context)
          Mapper which classifies the vectors to respective clusters.
static List<Cluster> populateClusterModels(org.apache.hadoop.fs.Path clusterOutputPath, org.apache.hadoop.conf.Configuration conf)
           
protected  void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterClassificationMapper

public ClusterClassificationMapper()
Method Detail

setup

protected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
              throws IOException,
                     InterruptedException
Overrides:
setup in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.WritableComparable<?>,VectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
Throws:
IOException
InterruptedException

map

protected void map(org.apache.hadoop.io.WritableComparable<?> key,
                   VectorWritable vw,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Mapper which classifies the vectors to respective clusters.

Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.WritableComparable<?>,VectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
Throws:
IOException
InterruptedException

populateClusterModels

public static List<Cluster> populateClusterModels(org.apache.hadoop.fs.Path clusterOutputPath,
                                                  org.apache.hadoop.conf.Configuration conf)
                                           throws IOException
Throws:
IOException


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