|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.subgroupminer.freqitemset.FrequentItemSet
public class FrequentItemSet
A FrequentItemSet represents items that occur together in a number of transactions. The items are represented with integers as their id. This number directly corresponds to the support. Frequent itemsets can either be free, closed or maximal. Free sets have no other constraint then the minimum support. Closed itemsets have no superset with the same support and maximal itemsets have no frequent superset at all.
Nested Class Summary | |
---|---|
static class |
FrequentItemSet.Type
The type of the frequent itemset. |
Constructor Summary | |
---|---|
FrequentItemSet(String id)
Creates an empty frequent itemset with no items, support = 0 and neither closed nor maximal. |
|
FrequentItemSet(String id,
List<Integer> items)
Creates frequent itemset with the passed items, support = 0 and neither closed nor maximal. |
|
FrequentItemSet(String id,
List<Integer> items,
double support)
Creates a fequent itemset with the passed items and the given support. |
|
FrequentItemSet(String id,
List<Integer> items,
double support,
boolean isClosed,
boolean isMaximal)
Creates a frequent itemset with the passed items, the given support and whether it is closed or maximal. |
Method Summary | |
---|---|
void |
add(Integer item)
Adds the passed item to the set. |
String |
getId()
|
List<Integer> |
getItems()
Returns a copy of the items in this set. |
double |
getSupport()
|
boolean |
isClosed()
|
boolean |
isMaximal()
|
boolean |
isSubsetOf(FrequentItemSet s2)
Returns true , if this itemset is a subset of the passed
one, that is, if the passed one contains all items of this set. |
Iterator<Integer> |
iterator()
|
void |
setClosed(boolean isClosed)
Sets whether this set is closed or not. |
void |
setItems(List<Integer> items)
Adds a set of items. |
void |
setMaximal(boolean isMaximal)
Sets whether this set is maximal or not. |
void |
setSupport(double support)
Sets the support of this set. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FrequentItemSet(String id)
id
- - the id of the itemsetpublic FrequentItemSet(String id, List<Integer> items)
id
- the id of this itemsetitems
- the items constituting this setpublic FrequentItemSet(String id, List<Integer> items, double support)
id
- the id of this itemsetitems
- the items constituting this setsupport
- the support of this itemsetpublic FrequentItemSet(String id, List<Integer> items, double support, boolean isClosed, boolean isMaximal)
false
it is considered to be free.
id
- the id of this itemsetitems
- the items consituting this itemset.support
- the support of this itemset.isClosed
- true
, if this itemset is closed,
false
otherwiseisMaximal
- true
if this itemset is maximal,
false
otherwiseMethod Detail |
---|
public boolean isSubsetOf(FrequentItemSet s2)
true
, if this itemset is a subset of the passed
one, that is, if the passed one contains all items of this set.
s2
- the frequent itemset to test on
true
, if this is a subset of the passed one,
false
otherwisepublic String getId()
public void add(Integer item)
item
- the item to add to this setpublic Iterator<Integer> iterator()
iterator
in interface Iterable<Integer>
public List<Integer> getItems()
public void setItems(List<Integer> items)
items
- the items to add to this setpublic boolean isClosed()
true
, if this itemset is closed,
false
otherwisepublic void setClosed(boolean isClosed)
isClosed
- true
, if this set is closed,
false
otherwisepublic boolean isMaximal()
true
, if this set is maximal, false
otherwisepublic void setMaximal(boolean isMaximal)
isMaximal
- whether this frequent item set is maximal or notpublic double getSupport()
public void setSupport(double support)
support
- the support of this setpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |