org.apache.mahout.math.hadoop
Class MatrixColumnMeansJob.MatrixColumnMeansReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.NullWritable,VectorWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
org.apache.mahout.math.hadoop.MatrixColumnMeansJob.MatrixColumnMeansReducer
- Enclosing class:
- MatrixColumnMeansJob
public static class MatrixColumnMeansJob.MatrixColumnMeansReducer
- extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.NullWritable,VectorWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
The reducer adds the partial column-wise sums from each of the mappers to
compute the total column-wise sum. The total sum is then divided by the
total count of vectors to determine the column-wise mean.
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
Method Summary |
void |
reduce(org.apache.hadoop.io.NullWritable n,
Iterable<VectorWritable> vectors,
org.apache.hadoop.mapreduce.Reducer.Context context)
|
void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
|
Methods inherited from class org.apache.hadoop.mapreduce.Reducer |
cleanup, run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatrixColumnMeansJob.MatrixColumnMeansReducer
public MatrixColumnMeansJob.MatrixColumnMeansReducer()
setup
public void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
- Overrides:
setup
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.NullWritable,VectorWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
reduce
public void reduce(org.apache.hadoop.io.NullWritable n,
Iterable<VectorWritable> vectors,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.NullWritable,VectorWritable,org.apache.hadoop.io.IntWritable,VectorWritable>
- Throws:
IOException
InterruptedException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.