Class AbstractWekaSpectrumAnalysis

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, Serializable
    Direct Known Subclasses:
    FastICA, PCA, PLS

    public abstract class AbstractWekaSpectrumAnalysis
    extends AbstractSpectrumAnalysis
    Ancestor for Weka-based analysis schemes, i.e., ones that use Instances as basis.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected adams.data.instances.AbstractInstanceGenerator m_Generator
      the instance generator to use.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

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

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void check​(weka.core.Instances data)
      Hook method for checks.
      void defineOptions()
      Adds options to the internal list of options.
      protected String doAnalyze​(List<Spectrum> data)
      Performs the actual analysis.
      protected abstract String doAnalyze​(weka.core.Instances data)
      Performs the actual analysis.
      String generatorTipText()
      Returns the tip text for this property.
      adams.data.instances.AbstractInstanceGenerator getGenerator()
      Returns the instance generator.
      void setGenerator​(adams.data.instances.AbstractInstanceGenerator value)
      Sets the instance generator.
      • Methods inherited from class adams.data.analysis.AbstractAnalysis

        analyze
      • Methods inherited from class adams.core.option.AbstractOptionHandler

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

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

        getLoggingLevel
    • Field Detail

      • m_Generator

        protected adams.data.instances.AbstractInstanceGenerator m_Generator
        the instance generator to use.
    • Constructor Detail

      • AbstractWekaSpectrumAnalysis

        public AbstractWekaSpectrumAnalysis()
    • Method Detail

      • 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 adams.core.option.AbstractOptionHandler
      • setGenerator

        public void setGenerator​(adams.data.instances.AbstractInstanceGenerator value)
        Sets the instance generator.
        Parameters:
        value - the generator
      • getGenerator

        public adams.data.instances.AbstractInstanceGenerator getGenerator()
        Returns the instance generator.
        Returns:
        the generator
      • generatorTipText

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

        protected void check​(weka.core.Instances data)
        Hook method for checks.
        Parameters:
        data - the data to check
      • doAnalyze

        protected abstract String doAnalyze​(weka.core.Instances data)
                                     throws Exception
        Performs the actual analysis.
        Parameters:
        data - the data to analyze
        Returns:
        null if successful, otherwise error message
        Throws:
        Exception - if analysis fails
      • doAnalyze

        protected String doAnalyze​(List<Spectrum> data)
                            throws Exception
        Performs the actual analysis.
        Specified by:
        doAnalyze in class adams.data.analysis.AbstractAnalysis<List<Spectrum>>
        Parameters:
        data - the data to analyze
        Returns:
        null if successful, otherwise error message
        Throws:
        Exception - if analysis fails