类 DecisionTable
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.rules.DecisionTable
- 所有已实现的接口:
Serializable
,Cloneable
,AdditionalMeasureProducer
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
,WeightedInstancesHandler
- 直接已知子类:
DTNB
public class DecisionTable
extends Classifier
implements OptionHandler, WeightedInstancesHandler, AdditionalMeasureProducer, TechnicalInformationHandler
Class for building and using a simple decision table majority classifier.
For more information see:
Ron Kohavi: The Power of Decision Tables. In: 8th European Conference on Machine Learning, 174-189, 1995. BibTeX:
For more information see:
Ron Kohavi: The Power of Decision Tables. In: 8th European Conference on Machine Learning, 174-189, 1995. BibTeX:
@inproceedings{Kohavi1995, author = {Ron Kohavi}, booktitle = {8th European Conference on Machine Learning}, pages = {174-189}, publisher = {Springer}, title = {The Power of Decision Tables}, year = {1995} }Valid options are:
-S <search method specification> Full class name of search method, followed by its options. eg: "weka.attributeSelection.BestFirst -D 1" (default weka.attributeSelection.BestFirst)
-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.
Options specific to search method weka.attributeSelection.BestFirst:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7.
-D <0 = backward | 1 = forward | 2 = bi-directional> Direction of search. (default = 1).
-N <num> Number of non-improving nodes to consider before terminating search.
-S <num> Size of lookup cache for evaluated subsets. Expressed as a multiple of the number of attributes in the data set. (default = 1)
- 版本:
- $Revision: 12089 $
- 作者:
- Mark Hall (mhall@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
字段修饰符和类型字段说明static final int
static final int
static final int
default is accuracy for discrete class and RMSE for numeric classstatic final int
static final int
static final Tag[]
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Generates the classifier.Returns the tip text for this propertyReturns the tip text for this propertydouble[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.Returns an enumeration of the additional measure namesReturns the tip text for this propertyReturns default capabilities of the classifier.int
Gets the number of folds for cross validationboolean
Gets whether rules are being printedGets the currently set performance evaluation measure used for selecting attributes for the decision tabledouble
getMeasure
(String additionalMeasureName) Returns the value of the named measureString[]
Gets the current settings of the classifier.Returns the revision string.Gets the current search methodReturns 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
Gets whether IBk is being used instead of the majority classReturns a string describing classifierReturns an enumeration describing the available options.static void
Main method for testing this class.double
Returns the number of rulesReturns a string description of the features selectedReturns the tip text for this propertyvoid
setCrossVal
(int folds) Sets the number of folds for cross validation (1 = leave one out)void
setDisplayRules
(boolean rules) Sets whether rules are to be printedvoid
setEvaluationMeasure
(SelectedTag newMethod) Sets the performance evaluation measure to use for selecting attributes for the decision tablevoid
setOptions
(String[] options) Parses the options for this object.void
Sets the search method to usevoid
setUseIBk
(boolean ibk) Sets whether IBk should be used instead of the majority classtoString()
Returns a description of the classifier.Returns the tip text for this property从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
字段详细资料
-
EVAL_DEFAULT
public static final int EVAL_DEFAULTdefault is accuracy for discrete class and RMSE for numeric class- 另请参阅:
-
EVAL_ACCURACY
public static final int EVAL_ACCURACY- 另请参阅:
-
EVAL_RMSE
public static final int EVAL_RMSE- 另请参阅:
-
EVAL_MAE
public static final int EVAL_MAE- 另请参阅:
-
EVAL_AUC
public static final int EVAL_AUC- 另请参阅:
-
TAGS_EVALUATION
-
-
构造器详细资料
-
DecisionTable
public DecisionTable()Constructor for a DecisionTable
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
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.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all the available options.
-
crossValTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setCrossVal
public void setCrossVal(int folds) Sets the number of folds for cross validation (1 = leave one out)- 参数:
folds
- the number of folds
-
getCrossVal
public int getCrossVal()Gets the number of folds for cross validation- 返回:
- the number of cross validation folds
-
useIBkTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setUseIBk
public void setUseIBk(boolean ibk) Sets whether IBk should be used instead of the majority class- 参数:
ibk
- true if IBk is to be used
-
getUseIBk
public boolean getUseIBk()Gets whether IBk is being used instead of the majority class- 返回:
- true if IBk is being used
-
displayRulesTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setDisplayRules
public void setDisplayRules(boolean rules) Sets whether rules are to be printed- 参数:
rules
- true if rules are to be printed
-
getDisplayRules
public boolean getDisplayRules()Gets whether rules are being printed- 返回:
- true if rules are being printed
-
searchTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setSearch
Sets the search method to use- 参数:
search
-
-
getSearch
Gets the current search method- 返回:
- the search method used
-
evaluationMeasureTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getEvaluationMeasure
Gets the currently set performance evaluation measure used for selecting attributes for the decision table- 返回:
- the performance evaluation measure
-
setEvaluationMeasure
Sets the performance evaluation measure to use for selecting attributes for the decision table- 参数:
newMethod
- the new performance evaluation metric to use
-
setOptions
Parses the options for this object. Valid options are:-S <search method specification> Full class name of search method, followed by its options. eg: "weka.attributeSelection.BestFirst -D 1" (default weka.attributeSelection.BestFirst)
-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.
Options specific to search method weka.attributeSelection.BestFirst:
-P <start set> Specify a starting set of attributes. Eg. 1,3,5-7.
-D <0 = backward | 1 = forward | 2 = bi-directional> Direction of search. (default = 1).
-N <num> Number of non-improving nodes to consider before terminating search.
-S <num> Size of lookup cache for evaluated subsets. Expressed as a multiple of the number of attributes in the data set. (default = 1)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中Classifier
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- an array of strings suitable for passing to setOptions
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Generates the classifier.- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- set of instances serving as training data- 抛出:
Exception
- if the classifier has not been generated successfully
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- predicted class probability distribution
- 抛出:
Exception
- if distribution can't be computed
-
printFeatures
Returns a string description of the features selected- 返回:
- a string of features
-
measureNumRules
public double measureNumRules()Returns the number of rules- 返回:
- the number of rules
-
enumerateMeasures
Returns an enumeration of the additional measure names- 指定者:
enumerateMeasures
在接口中AdditionalMeasureProducer
- 返回:
- an enumeration of the measure names
-
getMeasure
Returns the value of the named measure- 指定者:
getMeasure
在接口中AdditionalMeasureProducer
- 参数:
additionalMeasureName
- the name of the measure to query for its value- 返回:
- the value of the named measure
- 抛出:
IllegalArgumentException
- if the named measure is not supported
-
toString
Returns a description of the classifier. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- the command-line options
-