org.apache.mahout.cf.taste.hadoop.cooccurence
Class ItemSimilarityEstimator

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.mahout.cf.taste.hadoop.cooccurence.ItemSimilarityEstimator
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public final class ItemSimilarityEstimator
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

This class feeds into all the item bigrams generated with ItemBigramGenerator. The input is partitioned on the first item of the bigram, distributed and sorted by the map-reduce framework and grouped on first item of the bigram so that each reducer sees all the bigrams for each unique first item.


Nested Class Summary
static class ItemSimilarityEstimator.FirstPartitioner
          Partition based on the first part of the bigram.
static class ItemSimilarityEstimator.ItemItemCombiner
           
static class ItemSimilarityEstimator.ItemItemMapper
          Output K -> (item1, item2), V -> ONE
static class ItemSimilarityEstimator.ItemItemReducer
          All sorted bigrams for item1 are recieved in reduce.
 
Constructor Summary
ItemSimilarityEstimator()
           
 
Method Summary
 org.apache.hadoop.mapred.JobConf prepareJob(java.lang.String inputPaths, org.apache.hadoop.fs.Path outputPath, int maxFreqItems, int reducers)
           
 int run(java.lang.String[] args)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Constructor Detail

ItemSimilarityEstimator

public ItemSimilarityEstimator()
Method Detail

prepareJob

public org.apache.hadoop.mapred.JobConf prepareJob(java.lang.String inputPaths,
                                                   org.apache.hadoop.fs.Path outputPath,
                                                   int maxFreqItems,
                                                   int reducers)

run

public int run(java.lang.String[] args)
        throws java.io.IOException
Specified by:
run in interface org.apache.hadoop.util.Tool
Throws:
java.io.IOException


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