java.io.Serializable
public class MLRule
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
java.util.BitSet |
coveredInstances |
|
weka.core.Instances |
data |
|
boolean |
isUsed |
|
int |
selectedClass |
|
java.util.Vector |
selectors |
Constructor | Description |
---|---|
MLRule() |
Modifier and Type | Method | Description |
---|---|---|
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
|
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 coveres given instance
|
boolean |
isInside(int attrNum,
double value) |
this method tells us if given value on given attribute is inside this rule
|
void |
removeUnusedSelectors(java.util.BitSet positiveExamples,
java.util.BitSet negativeExamples,
double minimalPositiveCovering) |
this method removes useless selectors from current rule
|
java.lang.String |
toString() |
Returns a string representation of this Rule, containing
the String representation of each selector.
|
public java.util.Vector selectors
public int selectedClass
public java.util.BitSet coveredInstances
public weka.core.Instances data
public boolean isUsed
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 negativeExamples