public class JRip.RipperRule extends Rule
Constructor and Description |
---|
RipperRule()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
copy()
Get a shallow copy of this rule
|
boolean |
covers(Instance datum)
Whether the instance covered by this rule
|
FastVector |
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 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 FastVector 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()