Class AmplitudeRange

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.QuickInfoSupporter, adams.core.ShallowCopySupporter<adams.data.outlier.OutlierDetector>, adams.core.SizeOfHandler, adams.data.outlier.OutlierDetector<Spectrum>, adams.data.outlier.TrainableOutlierDetector<Spectrum>, Serializable, Comparable

    public class AmplitudeRange
    extends adams.data.outlier.AbstractOutlierDetector<Spectrum>
    implements adams.data.outlier.TrainableOutlierDetector<Spectrum>
    For each wave number in the training data the range (min/max) is calculated.
    After training, if a spectrum falls outside these ranges, it gets flagged as an outlier.
    NB: Assumes the spectra (training and subsequent) have the same wave numbers.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    Version:
    $Revision$
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class adams.data.outlier.AbstractOutlierDetector

        adams.data.outlier.AbstractOutlierDetector.DetectorJob<T extends adams.data.container.DataContainer>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected gnu.trove.map.hash.TFloatFloatHashMap m_Max
      the maximum.
      protected gnu.trove.map.hash.TFloatFloatHashMap m_Min
      the minimum.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      AmplitudeRange()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String globalInfo()
      Returns a string describing the object.
      protected void initialize()
      Initializes the members.
      boolean isTrained()
      Returns whether the detector has been trained already and is ready to use.
      protected List<String> processData​(Spectrum data)
      Performs the actual detection.
      void resetDetector()
      Resets the detector, i.e., flags it as "not trained".
      void trainDetector​(Spectrum[] data)
      Trains the detector with the specified data.
      • Methods inherited from class adams.data.outlier.AbstractOutlierDetector

        checkData, cleanUp, compareTo, destroy, detect, equals, forCommandLine, forName, getOutlierDetectors, getQuickInfo, reset, shallowCopy, shallowCopy
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, defineOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.CleanUpHandler

        cleanUp
      • Methods inherited from interface adams.core.Destroyable

        destroy
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, defineOptions, getOptionManager, toCommandLine
      • Methods inherited from interface adams.data.outlier.OutlierDetector

        detect, shallowCopy, shallowCopy
    • Field Detail

      • m_Min

        protected gnu.trove.map.hash.TFloatFloatHashMap m_Min
        the minimum.
      • m_Max

        protected gnu.trove.map.hash.TFloatFloatHashMap m_Max
        the maximum.
    • Constructor Detail

      • AmplitudeRange

        public AmplitudeRange()
    • 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
      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.core.option.AbstractOptionHandler
      • resetDetector

        public void resetDetector()
        Resets the detector, i.e., flags it as "not trained".
        Specified by:
        resetDetector in interface adams.data.outlier.TrainableOutlierDetector<Spectrum>
        See Also:
        isTrained()
      • isTrained

        public boolean isTrained()
        Returns whether the detector has been trained already and is ready to use.
        Specified by:
        isTrained in interface adams.data.outlier.TrainableOutlierDetector<Spectrum>
        Returns:
        true if already trained
      • trainDetector

        public void trainDetector​(Spectrum[] data)
        Trains the detector with the specified data.
        Specified by:
        trainDetector in interface adams.data.outlier.TrainableOutlierDetector<Spectrum>
      • processData

        protected List<String> processData​(Spectrum data)
        Performs the actual detection.
        Specified by:
        processData in class adams.data.outlier.AbstractOutlierDetector<Spectrum>
        Parameters:
        data - the data to process
        Returns:
        the detections