org.apache.mahout.clustering.lda
Class LDAReducer

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<IntPairWritable,org.apache.hadoop.io.DoubleWritable,IntPairWritable,org.apache.hadoop.io.DoubleWritable>
      extended by org.apache.mahout.clustering.lda.LDAReducer

public class LDAReducer
extends org.apache.hadoop.mapreduce.Reducer<IntPairWritable,org.apache.hadoop.io.DoubleWritable,IntPairWritable,org.apache.hadoop.io.DoubleWritable>

A very simple reducer which simply logSums the input doubles and outputs a new double for sufficient statistics, and sums log likelihoods.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
LDAReducer()
           
 
Method Summary
 void reduce(IntPairWritable topicWord, Iterable<org.apache.hadoop.io.DoubleWritable> values, org.apache.hadoop.mapreduce.Reducer.Context context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.Reducer
cleanup, run, setup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAReducer

public LDAReducer()
Method Detail

reduce

public void reduce(IntPairWritable topicWord,
                   Iterable<org.apache.hadoop.io.DoubleWritable> values,
                   org.apache.hadoop.mapreduce.Reducer.Context context)
            throws IOException,
                   InterruptedException
Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<IntPairWritable,org.apache.hadoop.io.DoubleWritable,IntPairWritable,org.apache.hadoop.io.DoubleWritable>
Throws:
IOException
InterruptedException


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