|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.bayes.AODE
public class 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 (2005). Not So Naive Bayes: Aggregating One-Dependence Estimators. Machine Learning. 58(1):5-24.
Further papers are available at
http://www.csse.monash.edu.au/~webb/.
Can use an m-estimate for smoothing base probability estimates in place of the Laplace correction (via option -M).
Default frequency limit set to 1.
@article{Webb2005,
author = {G. Webb and J. Boughton and Z. Wang},
journal = {Machine Learning},
number = {1},
pages = {5-24},
title = {Not So Naive Bayes: Aggregating One-Dependence Estimators},
volume = {58},
year = {2005}
}
Valid options are:
-D Output debugging information
-F <int> Impose a frequency limit for superParents (default is 1)
-M Use m-estimate instead of laplace correction
-W <int> Specify a weight to use with m-estimate (default is 1)
| 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. |
String |
frequencyLimitTipText()
Returns the tip text for this property |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
int |
getFrequencyLimit()
Gets the frequency limit. |
String[] |
getOptions()
Gets the current settings of the classifier. |
String |
getRevision()
Returns the revision string. |
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on. |
boolean |
getUseMEstimates()
Gets if m-estimaces is being used. |
int |
getWeight()
Gets the weight used in m-estimate |
String |
globalInfo()
Returns a string describing this classifier |
Enumeration |
listOptions()
Returns an enumeration describing the available options |
static void |
main(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 |
setFrequencyLimit(int f)
Sets the frequency limit |
void |
setOptions(String[] options)
Parses a given list of options. |
void |
setUseMEstimates(boolean value)
Sets if m-estimates is to be used. |
void |
setWeight(int w)
Sets the weight for m-estimate |
String |
toString()
Returns a description of the classifier. |
void |
updateClassifier(Instance instance)
Updates the classifier with the given instance. |
String |
useMEstimatesTipText()
Returns the tip text for this property |
String |
weightTipText()
Returns the tip text for this property |
| Methods inherited from class weka.classifiers.Classifier |
|---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AODE()
| Method Detail |
|---|
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierCapabilities
public void buildClassifier(Instances instances)
throws Exception
buildClassifier in class Classifierinstances - set of instances serving as training data
Exception - if the classifier has not been generated
successfullypublic void updateClassifier(Instance instance)
updateClassifier in interface UpdateableClassifierinstance - the new training instance to include in the model
public double[] distributionForInstance(Instance instance)
throws Exception
distributionForInstance in class Classifierinstance - the instance to be classified
Exception - if there is a problem generating the prediction
public double NBconditionalProb(Instance instance,
int classVal)
instance - the instance to be classifiedclassVal - the class for which to calculate the probability
public Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Classifier
public void setOptions(String[] options)
throws Exception
-D Output debugging information
-F <int> Impose a frequency limit for superParents (default is 1)
-M Use m-estimate instead of laplace correction
-W <int> Specify a weight to use with m-estimate (default is 1)
setOptions in interface OptionHandlersetOptions in class Classifieroptions - the list of options as an array of strings
Exception - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Classifierpublic String weightTipText()
public void setWeight(int w)
w - the weightpublic int getWeight()
public String useMEstimatesTipText()
public boolean getUseMEstimates()
public void setUseMEstimates(boolean value)
value - Value to assign to m_MEstimates.public String frequencyLimitTipText()
public void setFrequencyLimit(int f)
f - the frequency limitpublic int getFrequencyLimit()
public String toString()
toString in class Objectpublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifierpublic static void main(String[] argv)
argv - the options
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||