|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.classifiers.Classifier | +--weka.classifiers.bayes.AODE
AODE achieves highly accurate classification by averaging over all
of a small space of alternative naive-Bayes-like models that have
weaker (and hence less detrimental) independence assumptions than
naive Bayes. The resulting algorithm is computationally efficient while
delivering highly accurate classification on many learning tasks.
For more information, see
G. Webb, J. Boughton & Z. Wang (2003). Not So Naive Bayes.
Submitted for publication
G. Webb, J. Boughton & Z. Wang (2002). Averaged One-Dependence
Estimators: Preliminary Results. AI2002 Data Mining Workshop, Canberra.
Valid options are:
-D
Debugging information is printed if this flag is specified.
-F
Specify the frequency limit for parent attributes.
Constructor Summary | |
AODE()
|
Method Summary | |
void |
buildClassifier(Instances instances)
Generates the classifier. |
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test instance. |
java.lang.String |
frequencyLimitForParentAttributesTipText()
Returns the tip text for this property |
int |
getFrequencyLimitForParentAttributes()
Return the frequency limit for parent attributes |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
java.lang.String |
globalInfo()
Returns a string describing this classifier |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
double |
NBconditionalProb(Instance instance,
int classVal)
Calculates the probability of the specified class for the given test instance, using naive Bayes. |
void |
setFrequencyLimitForParentAttributes(int fl)
Set the frequency limit for parent attributes |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Returns a description of the classifier. |
Methods inherited from class weka.classifiers.Classifier |
classifyInstance, debugTipText, forName, getDebug, makeCopies, setDebug |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AODE()
Method Detail |
public java.lang.String globalInfo()
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class Classifier
instances
- set of instances serving as training data
java.lang.Exception
- if the classifier has not been generated
successfullypublic double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance
in class Classifier
instance
- the instance to be classified
java.lang.Exception
- if there is a problem generating the predictionpublic double NBconditionalProb(Instance instance, int classVal)
instance
- the instance to be classifiedclassVal
- the class for which to calculate the probability
java.lang.Exception
- if there is a problem generating the predictionpublic java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-D
Debugging information is printed.
-F
Specify the frequency limit for parent attributes.
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public java.lang.String frequencyLimitForParentAttributesTipText()
public void setFrequencyLimitForParentAttributes(int fl)
fl
- an int
valuepublic int getFrequencyLimitForParentAttributes()
int
valuepublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
argv
- the options
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London