|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.rules.ConjunctiveRule.Antd
The single antecedent in the rule, which is composed of an attribute and the corresponding value. There are two inherited classes, namely NumericAntd and NominalAntd in which the attributes are numeric and nominal respectively.
Field Summary | |
protected Attribute |
att
The attribute of the antecedent |
protected double |
inform
The information of this antecedent test on the growing data |
protected double |
maxInfoGain
The maximum infoGain achieved by this antecedent test |
protected double[] |
uncover
The parameters related to the data not covered by the previous antecedents when the class is nominal |
protected double |
uncoverSum
The parameter related to the meanSquaredError of the data not covered by the previous antecedents when the class is numeric |
protected double |
uncoverWtSq
The parameter related to the meanSquaredError of the data not covered by the previous antecedents when the class is numeric |
protected double |
uncoverWtVl
The parameter related to the meanSquaredError of the data not covered by the previous antecedents when the class is numeric |
protected double |
value
The attribute value of the antecedent. |
Constructor Summary | |
ConjunctiveRule.Antd(Attribute a,
double[] unc)
Constructor for nominal class |
|
ConjunctiveRule.Antd(Attribute a,
double uncoveredWtSq,
double uncoveredWtVl,
double uncoveredWts)
|
Method Summary | |
protected double |
entropy(double[] value,
double sum)
Function used to calculate the entropy of given vector of values entropy = (1/sum)*{-sigma[i=1..P](Xi*log2(Xi)) + sum*log2(sum)} where P is the length of the vector |
Attribute |
getAttr()
|
double |
getAttrValue()
|
double |
getInfo()
|
double |
getMaxInfoGain()
|
abstract boolean |
isCover(Instance inst)
|
abstract Instances[] |
splitData(Instances data,
double defInfo)
|
abstract java.lang.String |
toString()
|
protected double |
wtMeanSqErr(double weightedSq,
double weightedValue,
double sum)
Function used to calculate the weighted mean squared error, i.e., sum[x-avg(x)]^2 based on the given elements of the formula: meanSquaredError = sum(Wi*Xi^2) - (sum(WiXi))^2/sum(Wi) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Attribute att
protected double value
protected double maxInfoGain
protected double inform
protected double uncoverWtSq
protected double uncoverWtVl
protected double uncoverSum
protected double[] uncover
Constructor Detail |
public ConjunctiveRule.Antd(Attribute a, double[] unc)
public ConjunctiveRule.Antd(Attribute a, double uncoveredWtSq, double uncoveredWtVl, double uncoveredWts)
Method Detail |
public abstract Instances[] splitData(Instances data, double defInfo)
public abstract boolean isCover(Instance inst)
public abstract java.lang.String toString()
public Attribute getAttr()
public double getAttrValue()
public double getMaxInfoGain()
public double getInfo()
protected double wtMeanSqErr(double weightedSq, double weightedValue, double sum)
weightedSq
- sum(Wi*Xi^2)weightedValue
- sum(WiXi)sum
- sum of weights
protected double entropy(double[] value, double sum)
value
- the given vector of valuessum
- the sum of the given values. It's provided just for efficiency.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |