public class AddClassification extends SimpleBatchFilter implements WeightedAttributesHandler, WeightedInstancesHandler
-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)
Constructor and Description |
---|
AddClassification() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
classifierTipText()
Returns the tip text for this property.
|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter.
|
Classifier |
getClassifier()
Gets the classifier used by the filter.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
boolean |
getOutputClassification()
Get whether the classifiction of the classifier is output.
|
boolean |
getOutputDistribution()
Get whether the classifiction of the classifier is output.
|
boolean |
getOutputErrorFlag()
Get whether the classifiction of the classifier is output.
|
boolean |
getRemoveOldClass()
Get whether the old class attribute is removed.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.io.File |
getSerializedClassifierFile()
Gets the file pointing to a serialized, trained classifier.
|
java.lang.String |
globalInfo()
Returns a string describing this filter.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
runs the filter with the given arguments.
|
java.lang.String |
outputClassificationTipText()
Returns the tip text for this property.
|
java.lang.String |
outputDistributionTipText()
Returns the tip text for this property.
|
java.lang.String |
outputErrorFlagTipText()
Returns the tip text for this property.
|
java.lang.String |
removeOldClassTipText()
Returns the tip text for this property.
|
java.lang.String |
serializedClassifierFileTipText()
Returns the tip text for this property.
|
void |
setClassifier(Classifier value)
Sets the classifier to classify instances with.
|
void |
setOptions(java.lang.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(java.io.File value)
Sets the file pointing to a serialized, trained classifier.
|
allowAccessToFullInputFormat, batchFinished, input, input
setInputFormat
batchFilterFile, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, toString, useFilter, wekaStaticWrapper
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
makeCopy
public java.lang.String globalInfo()
globalInfo
in class SimpleFilter
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
listOptions
in class Filter
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-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
in interface OptionHandler
setOptions
in class Filter
options
- the options to usejava.lang.Exception
- if setting of options failspublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Filter
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
public java.lang.String classifierTipText()
public void setClassifier(Classifier value)
value
- The classifier to be used (with its options set).public Classifier getClassifier()
public java.lang.String serializedClassifierFileTipText()
public java.io.File getSerializedClassifierFile()
public void setSerializedClassifierFile(java.io.File value)
value
- the file pointing to the serialized, trained classifierpublic java.lang.String outputClassificationTipText()
public boolean getOutputClassification()
public void setOutputClassification(boolean value)
value
- whether the classification of the classifier is output.public java.lang.String removeOldClassTipText()
public boolean getRemoveOldClass()
public void setRemoveOldClass(boolean value)
value
- whether the old class attribute is removed.public java.lang.String outputDistributionTipText()
public boolean getOutputDistribution()
public void setOutputDistribution(boolean value)
value
- whether the distribution of the classifier is output.public java.lang.String outputErrorFlagTipText()
public boolean getOutputErrorFlag()
public void setOutputErrorFlag(boolean value)
value
- whether the classification of the classifier is output.public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Filter
public static void main(java.lang.String[] args)
args
- the commandline arguments