Class FrequentPatternTree<T>
java.lang.Object
org.tweetyproject.machinelearning.assoc.FrequentPatternTree<T>
- Type Parameters:
T
- the type of items
Implements the an FP-Tree for the FP-Growth Algorithm for frequent pattern mining, cf.
[Jiawei Han, Jian Pei, Yiwen Yin. Mining frequent patterns without candidate generation.
ACM SIGMOD Record, Volume 29, Issue 2, June 2000 pp 1–12]
- Author:
- Matthias Thimm
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
a node of the tree -
Constructor Summary
ConstructorDescriptionFrequentPatternTree
(Collection<Collection<T>> database, double minsupport) Creates an FP-Tree for the given database with the given minimal support. -
Method Summary
Modifier and TypeMethodDescriptionExtracts all frequent patterns from this tree.extractFrequentPatterns
(Collection<T> prefix) Extracts all frequent patterns from this tree plusprefix
.toString()
-
Constructor Details
-
FrequentPatternTree
Creates an FP-Tree for the given database with the given minimal support.- Parameters:
database
- some set of transactionsminsupport
- minimal support
-
-
Method Details
-
extractFrequentPatterns
Extracts all frequent patterns from this tree.- Returns:
- the set of all frequent patterns from this tree
-
extractFrequentPatterns
Extracts all frequent patterns from this tree plusprefix
.- Parameters:
prefix
- items to be added to each set.- Returns:
- the set of all frequent patterns from this tree plus
prefix
.
-
toString
-