|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.fpm.pfpgrowth.fpgrowth2.FPTree
public final class FPTree
A straightforward implementation of FPTrees as described in Han et. al.
Nested Class Summary | |
---|---|
static class |
FPTree.FPNode
|
Constructor Summary | |
---|---|
FPTree(long[] attrCounts,
long minSupport)
Creates an FPTree using the attribute counts in attrCounts. |
|
FPTree(LongArrayList attrCountList,
long minSupport)
Creates an FPTree using the attribute counts in attrCountList. |
Method Summary | |
---|---|
void |
accumulate(IntArrayList argItems,
long count)
Adds an itemset with the given occurrance count. |
void |
accumulate(List<Integer> argItems,
long count)
Adds an itemset with the given occurrance count. |
Iterable<Integer> |
attrIterableRev()
Returns an Iterable over the attributes in the tree, sorted by frequency (high to low). |
FPTree |
createMoreFreqConditionalTree(int targetAttr)
Returns a conditional FP tree based on the targetAttr, containing only items that are more frequent. |
long |
headerCount(int attribute)
Returns the count of the given attribute, as supplied on construction. |
FPTree.FPNode |
root()
Returns the root node of the tree. |
Pair<FPTree,FPTree> |
splitSinglePrefix()
Return a pair of trees that result from separating a common prefix (if one exists) from the lower portion of this tree. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FPTree(LongArrayList attrCountList, long minSupport)
public FPTree(long[] attrCounts, long minSupport)
Method Detail |
---|
public long headerCount(int attribute)
public FPTree.FPNode root()
public void accumulate(IntArrayList argItems, long count)
public void accumulate(List<Integer> argItems, long count)
public Iterable<Integer> attrIterableRev()
public FPTree createMoreFreqConditionalTree(int targetAttr)
public Pair<FPTree,FPTree> splitSinglePrefix()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |