org.apache.mahout.fpm.pfpgrowth.fpgrowth2
Class FPGrowthIds
java.lang.Object
org.apache.mahout.fpm.pfpgrowth.fpgrowth2.FPGrowthIds
public class FPGrowthIds
- extends Object
Implementation of PFGrowth Algorithm
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 |
FPGrowthIds
public FPGrowthIds()
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 transactionfrequencyList
- list of frequent features and their support valueminSupport
- minimum support of the transactionsk
- Number of top frequent patterns to keepreturnableFeatures
- 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 generatedoutput
- The output collector to which the the generated patterns are
written
- Throws:
IOException
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.