Package adams.data.spectrumanalysis
Class AbstractWekaSpectrumAnalysis
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.analysis.AbstractAnalysis<List<Spectrum>>
-
- adams.data.spectrumanalysis.AbstractSpectrumAnalysis
-
- adams.data.spectrumanalysis.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
public abstract class AbstractWekaSpectrumAnalysis extends AbstractSpectrumAnalysis
Ancestor for Weka-based analysis schemes, i.e., ones that useInstances
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.
-
Constructor Summary
Constructors Constructor Description AbstractWekaSpectrumAnalysis()
-
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.spectrumanalysis.AbstractSpectrumAnalysis
check
-
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
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.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
-
-