All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.filters.unsupervised.instance.RemoveMisclassified

java.lang.Object
    |
    +----weka.filters.Filter
            |
            +----weka.filters.unsupervised.instance.RemoveMisclassified

public class RemoveMisclassified
extends Filter
implements UnsupervisedFilter, OptionHandler
A filter that removes instances which are incorrectly classified. Useful for removing outliers.

Valid filter-specific options are:

-W classifier string
Full class name of classifier to use, followed by scheme options. (required)

-C class index
Attribute on which misclassifications are based. If < 0 will use any current set class or default to the last attribute. -F number of folds
The number of folds to use for cross-validation cleansing. (<2 = no cross-validation - default)

-T threshold
Threshold for the max error when predicting numeric class. (Value should be >= 0, default = 0.1)

-I max iterations
The maximum number of cleansing iterations to perform. (<1 = until fully cleansed - default)

-V
Invert the match so that correctly classified instances are discarded.

Version:
$Revision: 1.1 $
Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)
Author:
Malcolm Ware (mfw4@cs.waikato.ac.nz)

Constructor Index

 o RemoveMisclassified()
 

Method Index

 o batchFinished()
Signify that this batch of input to the filter is finished.
 o classifierTipText()
Returns the tip text for this property
 o classIndexTipText()
Returns the tip text for this property
 o getClassifier()
Gets the classifier used by the filter.
 o getClassIndex()
Gets the attribute on which misclassifications are based.
 o getInvert()
Get whether selection is inverted.
 o getMaxIterations()
Gets the maximum number of cleansing iterations performed
 o getNumFolds()
Gets the number of cross-validation folds used by the filter.
 o getOptions()
Gets the current settings of the filter.
 o getThreshold()
Gets the threshold for the max error when predicting a numeric class.
 o globalInfo()
Returns a string describing this filter
 o invertTipText()
Returns the tip text for this property
 o listOptions()
Returns an enumeration describing the available options.
 o main(String[])
Main method for testing this class.
 o maxIterationsTipText()
Returns the tip text for this property
 o numFoldsTipText()
Returns the tip text for this property
 o setClassifier(Classifier)
Sets the classifier to classify instances with.
 o setClassIndex(int)
Sets the attribute on which misclassifications are based.
 o setInputFormat(Instances)
Sets the format of the input instances.
 o setInvert(boolean)
Set whether selection is inverted.
 o setMaxIterations(int)
Sets the maximum number of cleansing iterations to perform - < 1 means go until fully cleansed
 o setNumFolds(int)
Sets the number of cross-validation folds to use - < 2 means no cross-validation.
 o setOptions(String[])
Parses the options for this object.
 o setThreshold(double)
Sets the threshold for the max error when predicting a numeric class.
 o thresholdTipText()
Returns the tip text for this property

Constructor Detail

 o RemoveMisclassified
public RemoveMisclassified()

Method Detail

 o setInputFormat
public boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
          Sets the format of the input instances.
Parameters:
instanceInfo - an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).
Returns:
true if the outputFormat may be collected immediately
Throws:
java.lang.Exception - if the inputFormat can't be set successfully
Overrides:
setInputFormat in class Filter
 o batchFinished
public boolean batchFinished() throws java.lang.Exception
          Signify that this batch of input to the filter is finished.
Returns:
true if there are instances pending output
Throws:
java.lang.IllegalStateException - if no input structure has been defined
Overrides:
batchFinished in class Filter
 o listOptions
public java.util.Enumeration listOptions()
          Returns an enumeration describing the available options.
Returns:
an enumeration of all the available options.
 o setOptions
public void setOptions(java.lang.String options[]) throws java.lang.Exception
          Parses the options for this object. Valid options are:

-W classifier string
Full class name of classifier to use, followed by scheme options. (required)

-C class index
Attribute on which misclassifications are based. If < 0 will use any current set class or default to the last attribute. -F number of folds
The number of folds to use for cross-validation cleansing. (<2 = no cross-validation - default)

-T threshold
Threshold for the max error when predicting numeric class. (Value should be >= 0, default = 0.1)

-I max iterations
The maximum number of cleansing iterations to perform. (<1 = until fully cleansed - default)

-V
Invert the match so that correctly classified instances are discarded.

Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported
 o getOptions
public java.lang.String[] getOptions()
          Gets the current settings of the filter.
Returns:
an array of strings suitable for passing to setOptions
 o globalInfo
public java.lang.String globalInfo()
          Returns a string describing this filter
Returns:
a description of the filter suitable for displaying in the explorer/experimenter gui
 o classifierTipText
public java.lang.String classifierTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setClassifier
public void setClassifier(Classifier classifier)
          Sets the classifier to classify instances with.
Parameters:
classifier - The classifier to be used (with its options set).
 o getClassifier
public Classifier getClassifier()
          Gets the classifier used by the filter.
Returns:
The classifier to be used.
 o classIndexTipText
public java.lang.String classIndexTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setClassIndex
public void setClassIndex(int classIndex)
          Sets the attribute on which misclassifications are based. If < 0 will use any current set class or default to the last attribute.
Parameters:
classIndex - the class index.
 o getClassIndex
public int getClassIndex()
          Gets the attribute on which misclassifications are based.
Returns:
the class index.
 o numFoldsTipText
public java.lang.String numFoldsTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setNumFolds
public void setNumFolds(int numOfFolds)
          Sets the number of cross-validation folds to use - < 2 means no cross-validation.
Parameters:
numOfFolds - the number of folds.
 o getNumFolds
public int getNumFolds()
          Gets the number of cross-validation folds used by the filter.
Returns:
the number of folds.
 o thresholdTipText
public java.lang.String thresholdTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setThreshold
public void setThreshold(double threshold)
          Sets the threshold for the max error when predicting a numeric class. The value should be >= 0.
Parameters:
threshold - the numeric theshold.
 o getThreshold
public double getThreshold()
          Gets the threshold for the max error when predicting a numeric class.
Returns:
the numeric threshold.
 o maxIterationsTipText
public java.lang.String maxIterationsTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setMaxIterations
public void setMaxIterations(int iterations)
          Sets the maximum number of cleansing iterations to perform - < 1 means go until fully cleansed
Parameters:
iterations - the maximum number of iterations.
 o getMaxIterations
public int getMaxIterations()
          Gets the maximum number of cleansing iterations performed
Returns:
the maximum number of iterations.
 o invertTipText
public java.lang.String invertTipText()
          Returns the tip text for this property
Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui
 o setInvert
public void setInvert(boolean invert)
          Set whether selection is inverted.
Parameters:
invert - whether or not to invert selection.
 o getInvert
public boolean getInvert()
          Get whether selection is inverted.
Returns:
whether or not selection is inverted.
 o main
public static void main(java.lang.String argv[])
          Main method for testing this class.
Parameters:
argv - should contain arguments to the filter: use -h for help

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home