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 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 Stringcheck(SpreadSheet sheet)Checks whether the data can be processed.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.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.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, 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, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
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
-
-