Class AbstractActualVsPredictedProcessor<T>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.actualvspredictedprocessor.AbstractActualVsPredictedProcessor<T>
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,ActualVsPredictedProcessor<T>,Serializable
- Direct Known Subclasses:
AbstractActualVsPredictedHtmlProcessor,PassThrough
public abstract class AbstractActualVsPredictedProcessor<T> extends AbstractOptionHandler implements ActualVsPredictedProcessor<T>
Ancestor for processors that generate output from a spreadsheet with actual vs predicted data. The 1st column in the spreadsheet contains the actual values and the 2nd the predicted ones.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetColumnRangem_AdditionalRangethe range of the additional columns to include.-
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 AbstractActualVsPredictedProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringadditionalRangeTipText()Returns the tip text for this property.Stringcheck(SpreadSheet sheet)Checks whether the data can be processed.voiddefineOptions()Adds options to the internal list of options.protected abstract TdoProcess(SpreadSheet sheet)Processes the actual vs predicted data and returns the output generated.protected double[]getActualNumeric(SpreadSheet sheet)Returns the actual numeric values.protected String[]getAdditional(SpreadSheet sheet)Returns the additional values, row indices if no additional columns.SpreadSheetColumnRangegetAdditionalRange()Returns the range of columns to include.protected double[]getPredictedNumeric(SpreadSheet sheet)Returns the predicted numeric values.Tprocess(SpreadSheet sheet, MessageCollection errors)Processes the actual vs predicted data and returns the output generated.voidsetAdditionalRange(SpreadSheetColumnRange value)Sets the range of columns to include.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, toCommandLine, toString
-
Methods inherited from class adams.core.logging.CustomLoggingLevelObject
setLoggingLevel
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.transformer.actualvspredictedprocessor.ActualVsPredictedProcessor
generates
-
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, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_AdditionalRange
protected SpreadSheetColumnRange m_AdditionalRange
the range of the additional columns to include.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setAdditionalRange
public void setAdditionalRange(SpreadSheetColumnRange value)
Sets the range of columns to include.- Parameters:
value- the columns
-
getAdditionalRange
public SpreadSheetColumnRange getAdditionalRange()
Returns the range of columns to include.- Returns:
- the columns
-
additionalRangeTipText
public String additionalRangeTipText()
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
public String check(SpreadSheet sheet)
Checks whether the data can be processed.- Parameters:
sheet- the data to check- Returns:
- null if checks passed, otherwise error message
-
getActualNumeric
protected double[] getActualNumeric(SpreadSheet sheet)
Returns the actual numeric values.- Parameters:
sheet- the sheet to extract the values from- Returns:
- the values
-
getPredictedNumeric
protected double[] getPredictedNumeric(SpreadSheet sheet)
Returns the predicted numeric values.- Parameters:
sheet- the sheet to extract the values from- Returns:
- the values
-
getAdditional
protected String[] getAdditional(SpreadSheet sheet)
Returns the additional values, row indices if no additional columns.- Parameters:
sheet- the sheet to extract data from- Returns:
- the values
-
doProcess
protected abstract T doProcess(SpreadSheet sheet)
Processes the actual vs predicted data and returns the output generated.- Parameters:
sheet- the data to process- Returns:
- the output
-
process
public T process(SpreadSheet sheet, MessageCollection errors)
Processes the actual vs predicted data and returns the output generated.- Specified by:
processin interfaceActualVsPredictedProcessor<T>- Parameters:
sheet- the data to processerrors- for collecting errors- Returns:
- the output, null in case of error
-
-