org.apache.mahout.math.stats.entropy
Class CalculateEntropyMapper

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,VarIntWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.DoubleWritable>
      extended by org.apache.mahout.math.stats.entropy.CalculateEntropyMapper

public final class CalculateEntropyMapper
extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,VarIntWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.DoubleWritable>

Calculates the entropy for the value with H(x) = x * log(x)


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper
org.apache.hadoop.mapreduce.Mapper.Context
 
Constructor Summary
CalculateEntropyMapper()
           
 
Method Summary
protected  void map(org.apache.hadoop.io.Text key, VarIntWritable value, org.apache.hadoop.mapreduce.Mapper.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Mapper
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalculateEntropyMapper

public CalculateEntropyMapper()
Method Detail

map

protected void map(org.apache.hadoop.io.Text key,
                   VarIntWritable value,
                   org.apache.hadoop.mapreduce.Mapper.Context context)
            throws IOException,
                   InterruptedException
Overrides:
map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.Text,VarIntWritable,org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.DoubleWritable>
Throws:
IOException
InterruptedException


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