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

java.lang.Object
  extended by org.apache.hadoop.mapred.MapReduceBase
      extended by org.apache.mahout.classifier.bayes.mapreduce.common.BayesTfIdfReducer
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 BayesTfIdfReducer
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 beacuse only two values should be there inside the values


Constructor Summary
BayesTfIdfReducer()
           
 
Method Summary
 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, configure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.JobConfigurable
configure
 
Methods inherited from interface java.io.Closeable
close
 

Constructor Detail

BayesTfIdfReducer

public BayesTfIdfReducer()
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


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