org.apache.mahout.fpm.pfpgrowth.fpgrowth2
Class FPGrowthIds

java.lang.Object
  extended by org.apache.mahout.fpm.pfpgrowth.fpgrowth2.FPGrowthIds

public class FPGrowthIds
extends Object

Implementation of PFGrowth Algorithm


Constructor Summary
FPGrowthIds()
           
 
Method Summary
 void generateTopKFrequentPatterns(Iterator<Pair<org.apache.mahout.math.list.IntArrayList,Long>> transactionStream, org.apache.mahout.math.list.LongArrayList attributeFrequency, long minSupport, int k, org.apache.mahout.math.list.IntArrayList returnableFeatures, org.apache.hadoop.mapred.OutputCollector<Integer,List<Pair<List<Integer>,Long>>> output, StatusUpdater updater)
          Generate Top K Frequent Patterns for every feature in returnableFeatures given a stream of transactions and the minimum support
static List<Pair<String,TopKStringPatterns>> readFrequentPattern(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FPGrowthIds

public FPGrowthIds()
Method Detail

readFrequentPattern

public static List<Pair<String,TopKStringPatterns>> readFrequentPattern(org.apache.hadoop.conf.Configuration conf,
                                                                        org.apache.hadoop.fs.Path path)

generateTopKFrequentPatterns

public final void generateTopKFrequentPatterns(Iterator<Pair<org.apache.mahout.math.list.IntArrayList,Long>> transactionStream,
                                               org.apache.mahout.math.list.LongArrayList attributeFrequency,
                                               long minSupport,
                                               int k,
                                               org.apache.mahout.math.list.IntArrayList returnableFeatures,
                                               org.apache.hadoop.mapred.OutputCollector<Integer,List<Pair<List<Integer>,Long>>> output,
                                               StatusUpdater updater)
                                        throws IOException
Generate Top K Frequent Patterns for every feature in returnableFeatures given a stream of transactions and the minimum support

Parameters:
transactionStream - Iterator of transaction
frequencyList - list of frequent features and their support value
minSupport - minimum support of the transactions
k - Number of top frequent patterns to keep
returnableFeatures - set of features for which the frequent patterns are mined. If the set is empty or null, then top K patterns for every frequent item (an item whose support> minSupport) is generated
output - The output collector to which the the generated patterns are written
Throws:
IOException


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