org.apache.mahout.clustering.spectral
Class AffinityMatrixInputReducer

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
      extended by org.apache.mahout.clustering.spectral.AffinityMatrixInputReducer

public class AffinityMatrixInputReducer
extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>

Tasked with taking each DistributedRowMatrix entry and collecting them into vectors corresponding to rows. The input and output keys are the same, corresponding to the row in the ensuing matrix. The matrix entries are entered into a vector according to the column to which they belong, and the vector is then given the key corresponding to its row.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
AffinityMatrixInputReducer()
           
 
Method Summary
protected  void reduce(org.apache.hadoop.io.IntWritable row, Iterable<DistributedRowMatrix.MatrixEntryWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Reducer
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AffinityMatrixInputReducer

public AffinityMatrixInputReducer()
Method Detail

reduce

protected void reduce(org.apache.hadoop.io.IntWritable row,
                      Iterable<DistributedRowMatrix.MatrixEntryWritable> values,
                      org.apache.hadoop.mapreduce.Reducer.Context context)
               throws IOException,
                      InterruptedException
Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
Throws:
IOException
InterruptedException


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