org.apache.mahout.classifier.bayes.mapreduce.common
Class BayesFeatureReducer

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.mahout.classifier.bayes.mapreduce.common.BayesFeatureReducer
All Implemented Interfaces:
Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>

public class BayesFeatureReducer
extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Reducer<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>

Can also be used as a local Combiner. A simple summing reducer


Constructor Summary
BayesFeatureReducer()
           
 
Method Summary
 void configure(org.apache.hadoop.mapred.JobConf job)
           
 void reduce(StringTuple key, Iterator<org.apache.hadoop.io.DoubleWritable> values, org.apache.hadoop.mapred.OutputCollector<StringTuple,org.apache.hadoop.io.DoubleWritable> output, org.apache.hadoop.mapred.Reporter reporter)
           
 
Methods inherited from class org.apache.hadoop.mapred.MapReduceBase
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

BayesFeatureReducer

public BayesFeatureReducer()
Method Detail

reduce

public void reduce(StringTuple key,
                   Iterator<org.apache.hadoop.io.DoubleWritable> values,
                   org.apache.hadoop.mapred.OutputCollector<StringTuple,org.apache.hadoop.io.DoubleWritable> output,
                   org.apache.hadoop.mapred.Reporter reporter)
            throws IOException
Specified by:
reduce in interface org.apache.hadoop.mapred.Reducer<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>
Throws:
IOException

configure

public void configure(org.apache.hadoop.mapred.JobConf job)
Specified by:
configure in interface org.apache.hadoop.mapred.JobConfigurable
Overrides:
configure in class org.apache.hadoop.mapred.MapReduceBase


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.