Class AbstractIndexedSplitsRunsPredictions<T>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.indexedsplitsrunspredictions.AbstractIndexedSplitsRunsPredictions<T>
-
- Type Parameters:
T
- the accepted input data
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,FlowContextHandler
,IndexedSplitsRunsPredictions<T>
,Serializable
- Direct Known Subclasses:
InstancesIndexedSplitsRunsPredictions
,NullPredictions
public abstract class AbstractIndexedSplitsRunsPredictions<T> extends AbstractOptionHandler implements IndexedSplitsRunsPredictions<T>
Ancestor for generates predictions on indexed splits runs.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Actor
m_FlowContext
the flow context.protected boolean
m_Stopped
whether the evaluation was stopped.-
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 AbstractIndexedSplitsRunsPredictions()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
check(T data, IndexedSplitsRuns runs)
For checking the data.protected abstract SpreadSheet
doGenerate(T data, IndexedSplitsRuns runs, MessageCollection errors)
Generates predictions by applying the indexed splits runs to the data.SpreadSheet
generate(T data, IndexedSplitsRuns runs, MessageCollection errors)
Generates predictions by applying the indexed splits runs to the data.Actor
getFlowContext()
Returns the flow context, if any.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.boolean
isStopped()
Whether the execution has been stopped.abstract boolean
requiresFlowContext()
Returns whether flow context is actually required.void
setFlowContext(Actor value)
Sets the flow context.void
stopExecution()
Stops the execution.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.flow.transformer.indexedsplitsrunspredictions.IndexedSplitsRunsPredictions
accepts
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Field Detail
-
m_FlowContext
protected Actor m_FlowContext
the flow context.
-
m_Stopped
protected boolean m_Stopped
whether the evaluation was stopped.
-
-
Method Detail
-
setFlowContext
public void setFlowContext(Actor value)
Sets the flow context.- Specified by:
setFlowContext
in interfaceFlowContextHandler
- Parameters:
value
- the actor
-
getFlowContext
public Actor getFlowContext()
Returns the flow context, if any.- Specified by:
getFlowContext
in interfaceFlowContextHandler
- Returns:
- the actor, null if none available
-
requiresFlowContext
public abstract boolean requiresFlowContext()
Returns whether flow context is actually required.- Returns:
- true if required
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecution
in interfaceStoppable
-
isStopped
public boolean isStopped()
Whether the execution has been stopped.- Specified by:
isStopped
in interfaceStoppableWithFeedback
- Returns:
- true if stopped
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
The default implementation returns null.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
check
public String check(T data, IndexedSplitsRuns runs)
For checking the data.- Parameters:
data
- the data to use for evaluationruns
- the indexed splits to use- Returns:
- null if passed checks, otherwise error message
-
doGenerate
protected abstract SpreadSheet doGenerate(T data, IndexedSplitsRuns runs, MessageCollection errors)
Generates predictions by applying the indexed splits runs to the data.- Parameters:
data
- the data to use for evaluationruns
- the indexed splits to useerrors
- for collecting errors- Returns:
- the generated predictions, null in case of error
-
generate
public SpreadSheet generate(T data, IndexedSplitsRuns runs, MessageCollection errors)
Generates predictions by applying the indexed splits runs to the data.- Specified by:
generate
in interfaceIndexedSplitsRunsPredictions<T>
- Parameters:
data
- the data to use for evaluationruns
- the indexed splits to useerrors
- for collecting errors- Returns:
- the generated evaluations, null in case of error
-
-