public class JRip.RipperRule extends Rule
Constructor and Description |
---|
RipperRule()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUp(Instances data)
Removes redundant tests in the rule.
|
java.lang.Object |
copy()
Get a shallow copy of this rule
|
boolean |
covers(Instance datum)
Whether the instance covered by this rule
|
java.util.ArrayList<JRip.Antd> |
getAntds()
Return the antecedents
|
double |
getConsequent()
Gets the internal representation of the class label to be predicted
|
java.lang.String |
getRevision()
Returns the revision string.
|
void |
grow(Instances data)
Build one rule using the growing data
|
boolean |
hasAntds()
Whether this rule has antecedents, i.e.
|
void |
prune(Instances pruneData,
boolean useWhole)
Prune all the possible final sequences of the rule using the pruning
data.
|
void |
setConsequent(double cl)
Sets the internal representation of the class label to be predicted
|
double |
size()
the number of antecedents of the rule
|
java.lang.String |
toString(Attribute classAttr)
Prints this rule
|
public void cleanUp(Instances data)
data
- an instance object that contains the appropriate header information for the attributes.public void setConsequent(double cl)
cl
- the internal representation of the class label to be predictedpublic double getConsequent()
getConsequent
in class Rule
public java.lang.Object copy()
public boolean covers(Instance datum)
public boolean hasAntds()
public java.util.ArrayList<JRip.Antd> getAntds()
public double size()
public void grow(Instances data) throws java.lang.Exception
public void prune(Instances pruneData, boolean useWhole)
pruneData
- the pruning data used to prune the ruleuseWhole
- flag to indicate whether use the error rate of the whole
pruning data instead of the data coveredpublic java.lang.String toString(Attribute classAttr)
classAttr
- the class attribute in the datapublic java.lang.String getRevision()