|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.bayes.AODEsr
public class AODEsr
AODEsr augments AODE with Subsumption Resolution.
AODEsr detects specializations between two attribute values at
classification time and deletes the generalization attribute value.
For more information, see
Zheng, F., Webb, G.I. (2006): Efficient lazy elimination for
averaged-one dependence
estimators. In: Proc. 23th Int. Conf. Machine Learning (ICML 2006),
1113-1120
Note: the subsumption resolution technique is called lazy elimination
in the ICML paper.
BibTeX:
@INPROCEEDINGS{ZhengWebbICML2006, AUTHOR = {Fei Zheng and Geoffrey I. Webb}, TITLE = {Efficient Lazy Elimination for Averaged-One Dependence Estimators}, BOOKTITLE = {Proceedings of the Twenty-third International Conference on Machine Learning (ICML 2006)}, ISBN = {1-59593-383-2}, PAGES = {1113--1120}, PUBLISHER = {ACM Press}, YEAR = {2006}, } }Valid options are:
-D Output debugging information
-F <int> Impose a frequency limit for superParents (default is 1)
-L Use Laplace estimation (default is m-estimation)
-M <double> Specify the m value of m-estimation (default is 1)
-C <int> Specify critical value for specialization-generalization. (default is 50). Larger values than the default of 50 substantially reduce the risk of incorrectly inferring that one value subsumes another, but also reduces the number of true subsumptions that are detected.
Constructor Summary | |
---|---|
AODEsr()
|
Method Summary | |
---|---|
void |
buildClassifier(Instances instances)
Generates the classifier. |
java.lang.String |
criticalValueTipText()
Returns the tip text for this property |
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test instance. |
java.lang.String |
frequencyLimitTipText()
Returns the tip text for this property |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
int |
getCriticalValue()
Gets the critical value. |
int |
getFrequencyLimit()
Gets the frequency limit. |
double |
getMestWeight()
Gets the weight used in m-estimate |
java.lang.String[] |
getOptions()
Gets the current settings of the classifier. |
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 |
getUseLaplace()
Gets if laplace correction is being used. |
java.lang.String |
globalInfo()
Returns a string describing this classifier |
double |
LaplaceEstimate(double frequency,
double total,
double numValues)
Returns the probability estimate, using laplace correction |
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 |
MEstimate(double frequency,
double total,
double numValues)
Returns the probability estimate, using m-estimate |
java.lang.String |
mestWeightTipText()
Returns the tip text for this property |
double |
NBconditionalProb(Instance instance,
int classVal)
Calculates the probability of the specified class for the given test instance, using naive Bayes. |
void |
setCriticalValue(int c)
Sets the critical value |
void |
setFrequencyLimit(int f)
Sets the frequency limit |
void |
setMestWeight(double w)
Sets the weight for m-estimate |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setUseLaplace(boolean value)
Sets if laplace correction is to be used. |
java.lang.String |
toString()
Returns a description of the classifier. |
void |
updateClassifier(Instance instance)
Updates the classifier with the given instance. |
java.lang.String |
useLaplaceTipText()
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 AODEsr()
Method Detail |
---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
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 void updateClassifier(Instance instance)
updateClassifier
in interface UpdateableClassifier
instance
- the new training instance to include in the model
java.lang.Exception
- if the instance could not be incorporated in
the model.public 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) throws java.lang.Exception
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 double MEstimate(double frequency, double total, double numValues)
frequency
- frequency of value of interesttotal
- count of all valuesnumValues
- number of different values
public double LaplaceEstimate(double frequency, double total, double numValues)
frequency
- frequency of value of interesttotal
- count of all valuesnumValues
- number of different values
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-D Output debugging information
-F <int> Impose a frequency limit for superParents (default is 1)
-L Use Laplace estimation (default is m-estimation)
-M <double> Specify the m value of m-estimation (default is 1)
-C <int> Specify critical value for specialization-generalization. (default is 50). Larger values than the default of 50 substantially reduce the risk of incorrectly inferring that one value subsumes another, but also reduces the number of true subsumptions that are detected.
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 mestWeightTipText()
public void setMestWeight(double w)
w
- the weightpublic double getMestWeight()
public java.lang.String useLaplaceTipText()
public boolean getUseLaplace()
public void setUseLaplace(boolean value)
value
- Value to assign to m_Laplace.public java.lang.String frequencyLimitTipText()
public void setFrequencyLimit(int f)
f
- the frequency limitpublic int getFrequencyLimit()
public java.lang.String criticalValueTipText()
public void setCriticalValue(int c)
c
- the critical valuepublic int getCriticalValue()
public 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 |