org.apache.mahout.cf.taste.hadoop.cooccurence
Class ItemSimilarityEstimator.ItemItemReducer
java.lang.Object
org.apache.hadoop.mapred.MapReduceBase
org.apache.mahout.cf.taste.hadoop.cooccurence.ItemSimilarityEstimator.ItemItemReducer
- All Implemented Interfaces:
- java.io.Closeable, org.apache.hadoop.mapred.JobConfigurable, org.apache.hadoop.mapred.Reducer<Bigram,Bigram,Bigram,org.apache.hadoop.io.DoubleWritable>
- Enclosing class:
- ItemSimilarityEstimator
public static class ItemSimilarityEstimator.ItemItemReducer
- extends org.apache.hadoop.mapred.MapReduceBase
- implements org.apache.hadoop.mapred.Reducer<Bigram,Bigram,Bigram,org.apache.hadoop.io.DoubleWritable>
All sorted bigrams for item1 are recieved in reduce.
K -> (item1, item2), V -> (FREQ)
Method Summary |
void |
configure(org.apache.hadoop.mapred.JobConf conf)
|
void |
reduce(Bigram item,
java.util.Iterator<Bigram> simItemItr,
org.apache.hadoop.mapred.OutputCollector<Bigram,org.apache.hadoop.io.DoubleWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
|
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 |
ItemSimilarityEstimator.ItemItemReducer
public ItemSimilarityEstimator.ItemItemReducer()
configure
public void configure(org.apache.hadoop.mapred.JobConf conf)
- Specified by:
configure
in interface org.apache.hadoop.mapred.JobConfigurable
- Overrides:
configure
in class org.apache.hadoop.mapred.MapReduceBase
reduce
public void reduce(Bigram item,
java.util.Iterator<Bigram> simItemItr,
org.apache.hadoop.mapred.OutputCollector<Bigram,org.apache.hadoop.io.DoubleWritable> output,
org.apache.hadoop.mapred.Reporter reporter)
throws java.io.IOException
- Specified by:
reduce
in interface org.apache.hadoop.mapred.Reducer<Bigram,Bigram,Bigram,org.apache.hadoop.io.DoubleWritable>
- Throws:
java.io.IOException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.