|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.rules.Rule
weka.classifiers.rules.FURIA.RipperRule
public class FURIA.RipperRule
This class implements a single rule that predicts specified class. A rule consists of antecedents "AND"ed together and the consequent (class value) for the classification. In this class, the Information Gain (p*[log(p/t) - log(P/T)]) is used to select an antecedent and Reduced Error Prunning (REP) with the metric of accuracy rate p/(p+n) or (TP+TN)/(P+N) is used to prune the rule.
| Field Summary | |
|---|---|
FastVector |
m_Antds
The vector of antecedents of this rule |
| Constructor Summary | |
|---|---|
FURIA.RipperRule()
Constructor |
|
| Method Summary | |
|---|---|
void |
calculateConfidences(Instances data)
Calculation of the rule weights / confidences for all beginning rule stumps. |
java.lang.Object |
copy()
Get a shallow copy of this rule |
double |
coverageDegree(Instance datum)
The degree of coverage instance covered by this rule |
boolean |
covers(Instance datum)
Whether the instance covered by this rule |
void |
fuzzify(Instances data,
boolean allWeightsAreOne)
The fuzzification procedure |
double |
getConfidence()
Get the rule confidence. |
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 |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public FastVector m_Antds
| Constructor Detail |
|---|
public FURIA.RipperRule()
| Method Detail |
|---|
public void setConsequent(double cl)
cl - the internal representation of the class label to be predictedpublic double getConsequent()
getConsequent in class Rulepublic java.lang.Object copy()
copy in interface Copyablecopy in class Rulepublic double coverageDegree(Instance datum)
datum - the instance in question
public boolean covers(Instance datum)
covers in class Ruledatum - the instance in question
public boolean hasAntds()
hasAntds in class Rulepublic double size()
size in class Rule
public void grow(Instances data)
throws java.lang.Exception
grow in class Ruledata - the growing data used to build the rule
java.lang.Exception - if the consequent is not set yet
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 data
public void fuzzify(Instances data,
boolean allWeightsAreOne)
data - training dataallWeightsAreOne - flag whether all instances have weight 1. If this is the case branch-and-bound is possible for speed-up.public void calculateConfidences(Instances data)
data - The training datapublic double getConfidence()
public java.lang.String getRevision()
RevisionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||