org.apache.mahout.clustering.spectral
Class AffinityMatrixInputReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.IntWritable,DistributedRowMatrix.MatrixEntryWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
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 classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.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 |
AffinityMatrixInputReducer
public AffinityMatrixInputReducer()
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.