类 AddClassification
java.lang.Object
weka.filters.Filter
weka.filters.SimpleFilter
weka.filters.SimpleBatchFilter
weka.filters.supervised.attribute.AddClassification
- 所有已实现的接口:
Serializable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
A filter for adding the classification, the class distribution and an error flag to a dataset with a classifier. The classifier is either trained on the data itself or provided as serialized model.
Valid options are:
-D Turns on output of debugging information.
-W <classifier specification> Full class name of classifier to use, followed by scheme options. eg: "weka.classifiers.bayes.NaiveBayes -D" (default: weka.classifiers.rules.ZeroR)
-serialized <file> Instead of training a classifier on the data, one can also provide a serialized model and use that for tagging the data.
-classification Adds an attribute with the actual classification. (default: off)
-remove-old-class Removes the old class attribute. (default: off)
-distribution Adds attributes with the distribution for all classes (for numeric classes this will be identical to the attribute output with '-classification'). (default: off)
-error Adds an attribute indicating whether the classifier output a wrong classification (for numeric classes this is the numeric difference). (default: off)
- 版本:
- $Revision: 6900 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Returns the tip text for this property.Returns the Capabilities of this filter.Gets the classifier used by the filter.String[]
Gets the current settings of the classifier.boolean
Get whether the classifiction of the classifier is output.boolean
Get whether the classifiction of the classifier is output.boolean
Get whether the classifiction of the classifier is output.boolean
Get whether the old class attribute is removed.Returns the revision string.Gets the file pointing to a serialized, trained classifier.Returns a string describing this filter.Returns an enumeration describing the available options.static void
runs the filter with the given arguments.Returns the tip text for this property.Returns the tip text for this property.Returns the tip text for this property.Returns the tip text for this property.Returns the tip text for this property.void
setClassifier
(Classifier value) Sets the classifier to classify instances with.void
setOptions
(String[] options) Parses the options for this object.void
setOutputClassification
(boolean value) Set whether the classification of the classifier is output.void
setOutputDistribution
(boolean value) Set whether the Distribution of the classifier is output.void
setOutputErrorFlag
(boolean value) Set whether the classification of the classifier is output.void
setRemoveOldClass
(boolean value) Set whether the old class attribute is removed.void
setSerializedClassifierFile
(File value) Sets the file pointing to a serialized, trained classifier.从类继承的方法 weka.filters.SimpleBatchFilter
batchFinished, input
从类继承的方法 weka.filters.SimpleFilter
debugTipText, getDebug, setDebug, setInputFormat
从类继承的方法 weka.filters.Filter
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper
-
构造器详细资料
-
AddClassification
public AddClassification()
-
-
方法详细资料
-
globalInfo
Returns a string describing this filter.- 指定者:
globalInfo
在类中SimpleFilter
- 返回:
- a description of the filter suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中SimpleFilter
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses the options for this object. Valid options are:-D Turns on output of debugging information.
-W <classifier specification> Full class name of classifier to use, followed by scheme options. eg: "weka.classifiers.bayes.NaiveBayes -D" (default: weka.classifiers.rules.ZeroR)
-serialized <file> Instead of training a classifier on the data, one can also provide a serialized model and use that for tagging the data.
-classification Adds an attribute with the actual classification. (default: off)
-remove-old-class Removes the old class attribute. (default: off)
-distribution Adds attributes with the distribution for all classes (for numeric classes this will be identical to the attribute output with '-classification'). (default: off)
-error Adds an attribute indicating whether the classifier output a wrong classification (for numeric classes this is the numeric difference). (default: off)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中SimpleFilter
- 参数:
options
- the options to use- 抛出:
Exception
- if setting of options fails- 另请参阅:
-
SimpleFilter.reset()
-
getOptions
Gets the current settings of the classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中SimpleFilter
- 返回:
- an array of strings suitable for passing to setOptions
-
getCapabilities
Returns the Capabilities of this filter.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Filter
- 返回:
- the capabilities of this object
- 另请参阅:
-
classifierTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setClassifier
Sets the classifier to classify instances with.- 参数:
value
- The classifier to be used (with its options set).
-
getClassifier
Gets the classifier used by the filter.- 返回:
- The classifier to be used.
-
serializedClassifierFileTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getSerializedClassifierFile
Gets the file pointing to a serialized, trained classifier. If it is null or pointing to a directory it will not be used.- 返回:
- the file the serialized, trained classifier is located in
-
setSerializedClassifierFile
Sets the file pointing to a serialized, trained classifier. If the argument is null, doesn't exist or pointing to a directory, then the value is ignored.- 参数:
value
- the file pointing to the serialized, trained classifier
-
outputClassificationTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getOutputClassification
public boolean getOutputClassification()Get whether the classifiction of the classifier is output.- 返回:
- true if the classification of the classifier is output.
-
setOutputClassification
public void setOutputClassification(boolean value) Set whether the classification of the classifier is output.- 参数:
value
- whether the classification of the classifier is output.
-
removeOldClassTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getRemoveOldClass
public boolean getRemoveOldClass()Get whether the old class attribute is removed.- 返回:
- true if the old class attribute is removed.
-
setRemoveOldClass
public void setRemoveOldClass(boolean value) Set whether the old class attribute is removed.- 参数:
value
- whether the old class attribute is removed.
-
outputDistributionTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getOutputDistribution
public boolean getOutputDistribution()Get whether the classifiction of the classifier is output.- 返回:
- true if the distribution of the classifier is output.
-
setOutputDistribution
public void setOutputDistribution(boolean value) Set whether the Distribution of the classifier is output.- 参数:
value
- whether the distribution of the classifier is output.
-
outputErrorFlagTipText
Returns the tip text for this property.- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getOutputErrorFlag
public boolean getOutputErrorFlag()Get whether the classifiction of the classifier is output.- 返回:
- true if the classification of the classifier is output.
-
setOutputErrorFlag
public void setOutputErrorFlag(boolean value) Set whether the classification of the classifier is output.- 参数:
value
- whether the classification of the classifier is output.
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Filter
- 返回:
- the revision
-
main
runs the filter with the given arguments.- 参数:
args
- the commandline arguments
-