## org.apache.mahout.fpm.pfpgrowth.fpgrowth
Class FPGrowth<A extends java.lang.Comparable<? super A>>

    java.lang.Object
      org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPGrowth<A>

Type Parameters:
  `A` - the type used

    public class FPGrowth<A extends java.lang.Comparable<? super A>>

extends java.lang.Object

Implementation of PFGrowth Algorithm with FP-Bonsai pruning Generic parameter A is the object type used as the cell items in a transaction list.

Constructor Summary
`FPGrowth()`

Method Summary
`java.util.List<Pair<A,java.lang.Long>>` `generateFList(java.util.Iterator<Pair<java.util.List<A>,java.lang.Long>> transactions, int minSupport)` Generate the Feature Frequency list from the given transaction whose frequency > minSupport

`void`

`generateTopKFrequentPatterns(java.util.Iterator<Pair<java.util.List<A>,java.lang.Long>> transactionStream, java.util.List<Pair<A,java.lang.Long>> frequencyList, long minSupport, int k, java.util.Set<A> returnableFeatures, org.apache.hadoop.mapred.OutputCollector<A,java.util.List<Pair<java.util.List<A>,java.lang.Long>>> output, StatusUpdater updater)`
Generate Top K Frequent Patterns for every feature in returnableFeatures given a stream of transactions and the minimum support

`static java.util.List<Pair<java.lang.String,TopKStringPatterns>>` `readFrequentPattern(org.apache.hadoop.fs.FileSystem fs, 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

### FPGrowth

    public FPGrowth()

Method Detail

### readFrequentPattern

    public static java.util.List<Pair<java.lang.String,TopKStringPatterns>> readFrequentPattern(org.apache.hadoop.fs.FileSystem fs,
                                                                                                org.apache.hadoop.conf.Configuration conf,
                                                                                                org.apache.hadoop.fs.Path path)
                                                                                         throws java.io.IOException

  Throws:
    `java.io.IOException`

### generateFList

    public final java.util.List<Pair<A,java.lang.Long>> generateFList(java.util.Iterator<Pair<java.util.List<A>,java.lang.Long>> transactions,
                                                                      int minSupport)

  Generate the Feature Frequency list from the given transaction whose frequency > minSupport

  Parameters:
    `transactions` - Iterator over the transaction database
    `minSupport` - minSupport of the feature to be included
  Returns:
    the List of features and their associated frequency as a Pair

### generateTopKFrequentPatterns

    public final void generateTopKFrequentPatterns(java.util.Iterator<Pair<java.util.List<A>,java.lang.Long>> transactionStream,
                                                   java.util.List<Pair<A,java.lang.Long>> frequencyList,
                                                   long minSupport,
                                                   int k,
                                                   java.util.Set<A> returnableFeatures,
                                                   org.apache.hadoop.mapred.OutputCollector<A,java.util.List<Pair<java.util.List<A>,java.lang.Long>>> output,
                                                   StatusUpdater updater)
                                            throws java.io.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:
    `java.io.IOException`

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