org.apache.mahout.cf.taste.hadoop.item
Class ItemFilterAsVectorAndPrefsReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<VarLongWritable,VarLongWritable,VarIntWritable,VectorAndPrefsWritable>
org.apache.mahout.cf.taste.hadoop.item.ItemFilterAsVectorAndPrefsReducer
public class ItemFilterAsVectorAndPrefsReducer
- extends org.apache.hadoop.mapreduce.Reducer<VarLongWritable,VarLongWritable,VarIntWritable,VectorAndPrefsWritable>
we use a neat little trick to explicitly filter items for some users: we inject a NaN summand into the preference
estimation for those items, which makes AggregateAndRecommendReducer
automatically exclude them
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.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 |
ItemFilterAsVectorAndPrefsReducer
public ItemFilterAsVectorAndPrefsReducer()
reduce
protected void reduce(VarLongWritable itemID,
Iterable<VarLongWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context ctx)
throws IOException,
InterruptedException
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<VarLongWritable,VarLongWritable,VarIntWritable,VectorAndPrefsWritable>
- Throws:
IOException
InterruptedException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.