Class RemoveDuplicateSpectra

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.Randomizable, adams.core.ShallowCopySupporter<AbstractCleaner>, adams.core.SizeOfHandler, adams.flow.core.FlowContextHandler, Serializable, Comparable

    public class RemoveDuplicateSpectra
    extends AbstractCleaner
    implements adams.core.Randomizable
    Removes duplicate spectra from the dataset.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • RemoveDuplicateSpectra

        public RemoveDuplicateSpectra()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class AbstractCleaner
      • setMode

        public void setMode​(RemoveDuplicateSpectra.Mode value)
        Sets the mode for removing the duplicates.
        Parameters:
        value - the mode
      • modeTipText

        public String modeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setPostProcessing

        public void setPostProcessing​(RemoveDuplicateSpectra.PostProcessing value)
        Sets the post-processing to apply after duplicates may have been removed.
        Parameters:
        value - the type of post-processing
      • getPostProcessing

        public RemoveDuplicateSpectra.PostProcessing getPostProcessing()
        Returns the post-processing to apply after duplicates may have been removed.
        Returns:
        the type of post-processing
      • postProcessingTipText

        public String postProcessingTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setSeed

        public void setSeed​(long value)
        Sets the seed value.
        Specified by:
        setSeed in interface adams.core.Randomizable
        Parameters:
        value - the seed
      • getSeed

        public long getSeed()
        Returns the seed value.
        Specified by:
        getSeed in interface adams.core.Randomizable
        Returns:
        the seed
      • seedTipText

        public String seedTipText()
        Returns the tip text for this property.
        Specified by:
        seedTipText in interface adams.core.Randomizable
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • performCheck

        protected String performCheck​(weka.core.Instance data)
        Performs the actual check.
        Specified by:
        performCheck in class AbstractCleaner
        Parameters:
        data - the instance to check
        Returns:
        null if ok, otherwise error message
      • remove

        protected weka.core.Instances remove​(weka.core.Instances data,
                                             int[] indices)
        Removes the specified rows from the data.
        Parameters:
        data - the data to process
        indices - the rows to remove
        Returns:
        the reduced dataset (copy)
      • fast

        protected weka.core.Instances fast​(weka.core.Instances data)
        Performs a fast identification of duplicates.
        Parameters:
        data - the data to check
        Returns:
        the (potentially) updated dataset
      • accurate

        protected weka.core.Instances accurate​(weka.core.Instances data)
        Performs an accurate identification of duplicates.
        Parameters:
        data - the data to check
        Returns:
        the (potentially) updated dataset
      • performClean

        protected weka.core.Instances performClean​(weka.core.Instances data)
        Performs the actual check.
        Specified by:
        performClean in class AbstractCleaner
        Parameters:
        data - the instance to check
        Returns:
        the cleaned data, null in case of error