java.io.Serializable
public class VCMLRule
extends java.lang.Object
implements java.io.Serializable
Constructor | Description |
---|---|
VCMLRule() |
Modifier and Type | Method | Description |
---|---|---|
void |
addToSelectors(VCMLSelector selector) |
|
void |
collapseNumericalSelectors() |
this method collapse numerical selectors replace two selectors on the
same attribute (if one if Lesser type and second is greater equal type)
with one selector having InScope type
|
int[] |
getClassVector() |
Returns class coverage.
|
void |
getCover() |
this method creates a BitSet having information which examples from
learning set are covered by this rule
|
int |
getCover(weka.core.Instance instance) |
this method gives us information about how this rule covers given
instance
|
java.util.BitSet |
getCoveredInstances() |
|
weka.core.Instances |
getData() |
|
int |
getSelectedClass() |
|
java.util.List<VCMLSelector> |
getSelectors() |
|
boolean |
isInside(int attrNum,
double value) |
this method tells us if given value on given attribute is inside this
rule
|
boolean |
isUsed() |
|
void |
removeUnusedSelectors(java.util.BitSet positiveExamples,
java.util.BitSet negativeExamples,
double minimalPositiveCovering) |
this method removes useless selectors from current rule
|
void |
setClassVector(java.util.BitSet[] classes) |
|
void |
setCoveredInstances(java.util.BitSet coveredInstances) |
|
void |
setData(weka.core.Instances data) |
|
void |
setSelectedClass(int selectedClass) |
|
void |
setSelectors(java.util.List<VCMLSelector> selectors) |
|
void |
setUsed(boolean isUsed) |
|
java.lang.String |
toString() |
Returns a string representation of this Rule, containing the String
representation of each selector.
|
public void getCover()
public int getCover(weka.core.Instance instance)
instance
- -
instance to checkpublic boolean isInside(int attrNum, double value)
attrNum
- -
number of attribute in datasetvalue
- -
value to checkpublic java.lang.String toString()
toString
in class java.lang.Object
public void collapseNumericalSelectors()
public void removeUnusedSelectors(java.util.BitSet positiveExamples, java.util.BitSet negativeExamples, double minimalPositiveCovering)
positiveExamples
- -
all positive examplesnegativeExamples
- -
all negative examplesminimalPositiveCovering
- -
minimal acceptable ratio of positiveExamples to
negativeExamplespublic java.util.List<VCMLSelector> getSelectors()
public void setSelectors(java.util.List<VCMLSelector> selectors)
public void addToSelectors(VCMLSelector selector)
public int getSelectedClass()
public void setSelectedClass(int selectedClass)
public java.util.BitSet getCoveredInstances()
public void setCoveredInstances(java.util.BitSet coveredInstances)
public weka.core.Instances getData()
public void setData(weka.core.Instances data)
public boolean isUsed()
public void setUsed(boolean isUsed)
public void setClassVector(java.util.BitSet[] classes)
public int[] getClassVector()