org.apache.mahout.classifier.bayes.mapreduce.common
Class BayesWeightSummerMapper
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.mahout.classifier.bayes.mapreduce.common.BayesWeightSummerMapper
- All Implemented Interfaces:
- java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Mapper<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>
public class BayesWeightSummerMapper
- extends org.apache.hadoop.mapred.MapReduceBase
- implements org.apache.hadoop.mapred.Mapper<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>
Calculates weight sum for a unique label, and feature
Method Summary |
void |
map(StringTuple key,
org.apache.hadoop.io.DoubleWritable value,
org.apache.hadoop.mapred.OutputCollector<StringTuple,org.apache.hadoop.io.DoubleWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
We need to calculate the weight sums across each label and each feature |
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 |
BayesWeightSummerMapper
public BayesWeightSummerMapper()
map
public void map(StringTuple key,
org.apache.hadoop.io.DoubleWritable value,
org.apache.hadoop.mapred.OutputCollector<StringTuple,org.apache.hadoop.io.DoubleWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
throws java.io.IOException
- We need to calculate the weight sums across each label and each feature
- Specified by:
map
in interface org.apache.hadoop.mapred.Mapper<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>
- Parameters:
key
- The label,feature tuple containing the tfidf value
- Throws:
java.io.IOException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.