org.apache.mahout.clustering.evaluation
Class RepresentativePointsMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,WeightedVectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
      extended by org.apache.mahout.clustering.evaluation.RepresentativePointsMapper

public class RepresentativePointsMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,WeightedVectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
RepresentativePointsMapper()
           
 
Method Summary
protected  void cleanup(org.apache.hadoop.mapreduce.Mapper.Context context)
           
 void configure(Map<Integer,List<VectorWritable>> referencePoints, DistanceMeasure measure)
           
static Map<Integer,List<VectorWritable>> getRepresentativePoints(org.apache.hadoop.conf.Configuration conf)
           
static Map<Integer,List<VectorWritable>> getRepresentativePoints(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path statePath)
           
protected  void map(org.apache.hadoop.io.IntWritable clusterId, WeightedVectorWritable point, org.apache.hadoop.mapreduce.Mapper.Context context)
           
static void mapPoint(org.apache.hadoop.io.IntWritable clusterId, WeightedVectorWritable point, DistanceMeasure measure, Map<Integer,List<VectorWritable>> representativePoints, Map<Integer,WeightedVectorWritable> mostDistantPoints)
           
protected  void setup(org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepresentativePointsMapper

public RepresentativePointsMapper()
Method Detail

cleanup

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

map

protected void map(org.apache.hadoop.io.IntWritable clusterId,
                   WeightedVectorWritable point,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,WeightedVectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
Throws:
IOException
InterruptedException

mapPoint

public static void mapPoint(org.apache.hadoop.io.IntWritable clusterId,
                            WeightedVectorWritable point,
                            DistanceMeasure measure,
                            Map<Integer,List<VectorWritable>> representativePoints,
                            Map<Integer,WeightedVectorWritable> mostDistantPoints)

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.IntWritable,WeightedVectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
Throws:
IOException
InterruptedException

configure

public void configure(Map<Integer,List<VectorWritable>> referencePoints,
                      DistanceMeasure measure)

getRepresentativePoints

public static Map<Integer,List<VectorWritable>> getRepresentativePoints(org.apache.hadoop.conf.Configuration conf)

getRepresentativePoints

public static Map<Integer,List<VectorWritable>> getRepresentativePoints(org.apache.hadoop.conf.Configuration conf,
                                                                        org.apache.hadoop.fs.Path statePath)


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