public class DTNB extends DecisionTable
@inproceedings{Hall2008, author = {Mark Hall and Eibe Frank}, booktitle = {Proceedings of the 21st Florida Artificial Intelligence Society Conference (FLAIRS)}, pages = {318-319}, publisher = {AAAI press}, title = {Combining Naive Bayes and Decision Tables}, year = {2008} }Valid options are:
-X <number of folds> Use cross validation to evaluate features. Use number of folds = 1 for leave one out CV. (Default = leave one out CV)
-E <acc | rmse | mae | auc> Performance evaluation measure to use for selecting attributes. (Default = accuracy for discrete class and rmse for numeric class)
-I Use nearest neighbour instead of global table majority.
-R Display decision table rules.
EVAL_ACCURACY, EVAL_AUC, EVAL_DEFAULT, EVAL_MAE, EVAL_RMSE, TAGS_EVALUATION
Constructor and Description |
---|
DTNB() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Generates the classifier.
|
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given
test instance.
|
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
ASSearch |
getSearch()
Gets the current search method
|
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.
|
java.lang.String |
globalInfo()
Returns a string describing 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 |
measurePercentAttsUsedByDT()
Returns the number of rules
|
void |
setOptions(java.lang.String[] options)
Parses the options for this object.
|
void |
setSearch(ASSearch search)
Sets the search method to use
|
java.lang.String |
toString()
Returns a description of the classifier.
|
crossValTipText, displayRulesTipText, evaluationMeasureTipText, getCrossVal, getDisplayRules, getEvaluationMeasure, getUseIBk, measureNumRules, printFeatures, searchTipText, setCrossVal, setDisplayRules, setEvaluationMeasure, setUseIBk, useIBkTipText
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
public java.lang.String globalInfo()
globalInfo
in class DecisionTable
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
getTechnicalInformation
in class DecisionTable
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in class DecisionTable
data
- set of instances serving as training datajava.lang.Exception
- if the classifier has not been generated successfullypublic double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance
in class DecisionTable
instance
- the instance to be classifiedjava.lang.Exception
- if distribution can't be computedpublic java.lang.String toString()
DecisionTable
toString
in class DecisionTable
public double measurePercentAttsUsedByDT()
public java.util.Enumeration enumerateMeasures()
enumerateMeasures
in interface AdditionalMeasureProducer
enumerateMeasures
in class DecisionTable
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure
in interface AdditionalMeasureProducer
getMeasure
in class DecisionTable
additionalMeasureName
- the name of the measure to query for its valuejava.lang.IllegalArgumentException
- if the named measure is not supportedpublic Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class DecisionTable
Capabilities
public void setSearch(ASSearch search)
setSearch
in class DecisionTable
search
- public ASSearch getSearch()
getSearch
in class DecisionTable
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class DecisionTable
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-X <number of folds> Use cross validation to evaluate features. Use number of folds = 1 for leave one out CV. (Default = leave one out CV)
-E <acc | rmse | mae | auc> Performance evaluation measure to use for selecting attributes. (Default = accuracy for discrete class and rmse for numeric class)
-I Use nearest neighbour instead of global table majority.
-R Display decision table rules.
setOptions
in interface OptionHandler
setOptions
in class DecisionTable
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class DecisionTable
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class DecisionTable
public static void main(java.lang.String[] argv)
argv
- the command-line options