weka.filters.unsupervised.instance

## Class RemoveDuplicates

- java.lang.Object
- - weka.filters.Filter
  - - weka.filters.SimpleFilter
    - - weka.filters.SimpleBatchFilter
      - - weka.filters.unsupervised.instance.RemoveDuplicates

- All Implemented Interfaces:
    java.io.Serializable, CapabilitiesHandler, CapabilitiesIgnorer, OptionHandler, RevisionHandler

      public class RemoveDuplicates
      extends SimpleBatchFilter

  Removes all duplicate instances from the first batch of data it receives.

  Valid options are:

       -D
        Turns on output of debugging information.

  Version:
    $Revision: 9804 $
  Author:
    Eibe Frank (eibe@cs.waikato.ac.nz)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoveDuplicates()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Capabilities` | `getCapabilities()` Returns the Capabilities of this filter.
    `java.lang.String` | `getRevision()` Returns the revision string.
    `java.lang.String` | `globalInfo()` Returns a string describing this filter.
    `boolean` | `input(Instance instance)` Input an instance for filtering.
    `static void` | `main(java.lang.String[] args)` Main method for running this filter.

    - ### Methods inherited from class weka.filters.SimpleBatchFilter

      `allowAccessToFullInputFormat, batchFinished`

    - ### Methods inherited from class weka.filters.SimpleFilter

      `setInputFormat`

    - ### Methods inherited from class weka.filters.Filter

      `batchFilterFile, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getDebug, getDoNotCheckCapabilities, getOptions, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, listOptions, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, runFilter, setDebug, setDoNotCheckCapabilities, setOptions, toString, useFilter, wekaStaticWrapper`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### RemoveDuplicates

          public RemoveDuplicates()

  - ### Method Detail

    - #### globalInfo

          public java.lang.String globalInfo()

      Returns a string describing this filter.
      Specified by:
        `globalInfo` in class `SimpleFilter`
      Returns:
        a description of the filter suitable for displaying in the explorer/experimenter gui

    - #### input

          public boolean input(Instance instance)
                        throws java.lang.Exception

      Input an instance for filtering. Filter requires all training instances be read before producing output (calling the method batchFinished() makes the data available). If this instance is part of a new batch, m_NewBatch is set to false.
      Overrides:
        `input` in class `SimpleBatchFilter`
      Parameters:
        `instance` - the input instance
      Returns:
        true if the filtered instance may now be collected with output().
      Throws:
        `java.lang.IllegalStateException` - if no input structure has been defined
        `java.lang.Exception` - if something goes wrong
      See Also:
        `SimpleBatchFilter.batchFinished()`

    - #### getCapabilities

          public Capabilities getCapabilities()

      Returns the Capabilities of this filter.
      Specified by:
        `getCapabilities` in interface `CapabilitiesHandler`
      Overrides:
        `getCapabilities` in class `Filter`
      Returns:
        the capabilities of this object
      See Also:
        `Capabilities`

    - #### getRevision

          public java.lang.String getRevision()

      Returns the revision string.
      Specified by:
        `getRevision` in interface `RevisionHandler`
      Overrides:
        `getRevision` in class `Filter`
      Returns:
        the revision

    - #### main

          public static void main(java.lang.String[] args)

      Main method for running this filter.
      Parameters:
        `args` - arguments for the filter: use -h for help