All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.bayes.AODE

java.lang.Object
    |
    +----weka.classifiers.Classifier
            |
            +----weka.classifiers.DistributionClassifier
                    |
                    +----weka.classifiers.bayes.AODE

public class AODE
extends DistributionClassifier
implements OptionHandler, WeightedInstancesHandler
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.

Version:
$Revision: 1.2 $
Author:
Janice Boughton (jrbought@csse.monash.edu.au)
Author:
Zhihai Wang (zhw@csse.monash.edu.au)

Constructor Index

 o AODE()
 

Method Index

 o buildClassifier(Instances)
Generates the classifier.
 o distributionForInstance(Instance)
Calculates the class membership probabilities for the given test instance.
 o getFrequencyLimitForParentAttributes()
Return the frequency limit for parent attributes
 o getOptions()
Gets the current settings of the classifier.
 o listOptions()
Returns an enumeration describing the available options
 o main(String[])
Main method for testing this class.
 o NBconditionalProb(Instance, int)
Calculates the class membership probabilities for the given test instance, using naive Bayes.
 o setFrequencyLimitForParentAttributes(int)
Set the frequency limit for parent attributes
 o setOptions(String[])
Parses a given list of options.
 o toString()
Returns a description of the classifier.

Constructor Detail

 o AODE
public AODE()

Method Detail

 o buildClassifier
public void buildClassifier(Instances instances) throws java.lang.Exception
          Generates the classifier.
Parameters:
instances - set of instances serving as training data
Throws:
java.lang.Exception - if the classifier has not been generated successfully
Overrides:
buildClassifier in class Classifier
 o distributionForInstance
public double[] distributionForInstance(Instance instance) throws java.lang.Exception
          Calculates the class membership probabilities for the given test instance.
Parameters:
instance - the instance to be classified
Returns:
predicted class probability distribution
Throws:
java.lang.Exception - if there is a problem generating the prediction
Overrides:
distributionForInstance in class DistributionClassifier
 o NBconditionalProb
public double NBconditionalProb(Instance instance,
                                int classVal)
          Calculates the class membership probabilities for the given test instance, using naive Bayes.
Parameters:
instance - the instance to be classified
Returns:
predicted class probability distribution
Throws:
java.lang.Exception - if there is a problem generating the prediction
 o listOptions
public java.util.Enumeration listOptions()
          Returns an enumeration describing the available options
Returns:
an enumeration of all the available options
 o setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
          Parses a given list of options. Valid options are:

-D
Debugging information is printed.

-F
Specify the frequency limit for parent attributes.

Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported
 o setFrequencyLimitForParentAttributes
public void setFrequencyLimitForParentAttributes(int fl)
          Set the frequency limit for parent attributes
Parameters:
fl - an int value
 o getFrequencyLimitForParentAttributes
public int getFrequencyLimitForParentAttributes()
          Return the frequency limit for parent attributes
Returns:
an int value
 o getOptions
public java.lang.String[] getOptions()
          Gets the current settings of the classifier.
Returns:
an array of strings suitable for passing to setOptions
 o toString
public java.lang.String toString()
          Returns a description of the classifier.
Returns:
a description of the classifier as a string.
Overrides:
toString in class java.lang.Object
 o main
public static void main(java.lang.String argv[])
          Main method for testing this class.
Parameters:
argv - the options

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home