## org.apache.mahout.classifier.bayes.mapreduce.bayes
Class BayesThetaNormalizerMapper

    java.lang.Object
      org.apache.hadoop.mapred.MapReduceBase
          org.apache.mahout.classifier.bayes.mapreduce.bayes.BayesThetaNormalizerMapper

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 BayesThetaNormalizerMapper

extends org.apache.hadoop.mapred.MapReduceBase
implements org.apache.hadoop.mapred.Mapper<StringTuple,org.apache.hadoop.io.DoubleWritable,StringTuple,org.apache.hadoop.io.DoubleWritable>

Mapper for Calculating the ThetaNormalizer for a label in Naive Bayes Algorithm

Constructor Summary
`BayesThetaNormalizerMapper()`

Method Summary
`void` `configure(org.apache.hadoop.mapred.JobConf job)`
`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 thetaNormalization factor of each label

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

### BayesThetaNormalizerMapper

    public BayesThetaNormalizerMapper()

Method Detail

### 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 thetaNormalization factor of each label

  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 pair
    `value` - The tfIdf of the pair
  Throws:
    `java.io.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-2010 The Apache Software Foundation. All Rights Reserved.