org.apache.mahout.clustering.evaluation
Class RepresentativePointsMapper
java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.IntWritable,WeightedVectorWritable,org.apache.hadoop.io.IntWritable,WeightedVectorWritable>
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 classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper |
org.apache.hadoop.mapreduce.Mapper.Context |
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 |
RepresentativePointsMapper
public RepresentativePointsMapper()
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.