|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet<Subgroup>
nl.liacs.subdisc.SubgroupSet
public class SubgroupSet
A SubgroupSet is a TreeSet of Subgroups. If its
size is set to <= 0, the SubgroupSet has no maximum size, else the number of
Subgroups it can contain is limited by its size. In a nominal target setting
(TargetType) a
ROCList can be obtained from this SubgroupSet to create a
ROCCurve in a
ROCCurveWindow.
ROCList,
ROCCurve,
ROCCurveWindow,
Subgroup,
Serialized Form| Field Summary | |
|---|---|
static java.lang.Object[] |
ROC_HEADER
|
| Constructor Summary | |
|---|---|
SubgroupSet(int theSize)
Create a SubgroupSet of a certain size. |
|
SubgroupSet(int theSize,
int theTotalCoverage,
java.util.BitSet theBinaryTarget)
Creates a SubgroupSet of a certain size, but in a nominal target setting theTotalCoverage and theBinaryTarget should also be set. |
|
SubgroupSet(SubgroupSet theOriginal)
Creates a SubgroupSet just like the argument, except empty. |
|
| Method Summary | |
|---|---|
boolean |
add(Subgroup theSubgroup)
Tries to add the Subgroup passed in as parameter to this
SubgroupSet. |
int |
computeCoverCount(SubgroupSet theSet,
int theRow)
Computes the cover count of a particular example: the number of times this example is a member of a subgroup See van Leeuwen & Knobbe, ECML PKDD 2011 |
double |
computeMultiplicativeWeight(SubgroupSet theSet,
Subgroup theSubgroup)
Computes the multiplicative weight of a subgroup \n See van Leeuwen & Knobbe, ECML PKDD 2011. |
Subgroup |
getBestSubgroup()
|
java.util.BitSet |
getBinaryTargetClone()
Returns a copy of this SubgroupSets' BinaryTarget BitSet. |
ROCList |
getROCList()
Returns a new ROCList. |
java.lang.Object[][] |
getROCListSubgroups()
|
int |
getTotalCoverage()
|
float |
getTotalTargetCoverage()
|
SubgroupSet |
postProcess(SearchStrategy theSearchStrategy)
|
void |
print()
|
void |
saveExtent(java.io.BufferedWriter theWriter,
Table theTable,
java.util.BitSet theSubset,
TargetConcept theTargetConcept)
|
void |
setIDs()
|
| Methods inherited from class java.util.TreeSet |
|---|
addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
public static final java.lang.Object[] ROC_HEADER
| Constructor Detail |
|---|
public SubgroupSet(int theSize)
theSize - the size of this SubgroupSet, use theSize <= 0 for no
maximum size.
public SubgroupSet(int theSize,
int theTotalCoverage,
java.util.BitSet theBinaryTarget)
theSize - the size of this SubgroupSet, use theSize <= 0 for no
maximum size.theTotalCoverage - the total number of instances in the data (number
of rows in the Table).theBinaryTarget - a BitSet with bits set
for the instances covered by the target value.public SubgroupSet(SubgroupSet theOriginal)
| Method Detail |
|---|
public boolean add(Subgroup theSubgroup)
Subgroup passed in as parameter to this
SubgroupSet. Also ensures this SubgroupSet never exceeds its maximum size
(if one is set).
add in interface java.util.Collection<Subgroup>add in interface java.util.Set<Subgroup>add in class java.util.TreeSet<Subgroup>theSubgroup - theSubgroup to add to this SubgroupSet.
true if this SubgroupSet did not already contain the
specified SubGroup, false otherwise and if the Subgroup is
null.public Subgroup getBestSubgroup()
public void setIDs()
public void print()
public void saveExtent(java.io.BufferedWriter theWriter,
Table theTable,
java.util.BitSet theSubset,
TargetConcept theTargetConcept)
public java.util.BitSet getBinaryTargetClone()
BitSet. SubgroupSets only have a BinaryTarget
BitSet in a nominal target setting, meaning the
AttributeType of the
PrimaryTarget in the TargetConcept is of type
AttributeType.NOMINAL.
- Returns:
- a clone of this SubgroupSets' BinaryTarget
BitSet,
or null if this SubgroupSet has no BinaryTarget
BitSet.
public int getTotalCoverage()
public float getTotalTargetCoverage()
public SubgroupSet postProcess(SearchStrategy theSearchStrategy)
public int computeCoverCount(SubgroupSet theSet,
int theRow)
public double computeMultiplicativeWeight(SubgroupSet theSet,
Subgroup theSubgroup)
public ROCList getROCList()
ROCList. If Subgroups are
removed from this SubgroupSet, this new ROCList reflects these changes.
This method only returns a ROCList in a nominal target setting, meaning
the AttributeType of the
PrimaryTarget in the TargetConcept is of type
AttributeType.NOMINAL.
null if not in a nominal target
setting.public java.lang.Object[][] getROCListSubgroups()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||