Package adams.data.djl.networkgenerator
Class AbstractNetworkGenerator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.djl.networkgenerator.AbstractNetworkGenerator
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.QuickInfoSupporter,adams.core.SizeOfHandler,NetworkGenerator,adams.flow.core.FlowContextHandler,Serializable
- Direct Known Subclasses:
AbstractScript,AbstractScriptedNetworkGenerator,TabularRegressionGenerator
public abstract class AbstractNetworkGenerator extends adams.core.option.AbstractOptionHandler implements NetworkGenerator, adams.core.QuickInfoSupporter
Ancestor for network generators.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.flow.core.Actorm_FlowContextthe flow context.
-
Constructor Summary
Constructors Constructor Description AbstractNetworkGenerator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(ai.djl.basicdataset.tabular.TabularDataset dataset)Checks the dataset before generating the network.protected abstract ai.djl.nn.BlockdoGenerate(ai.djl.basicdataset.tabular.TabularDataset dataset)Generates the network using the supplied dataset.ai.djl.nn.Blockgenerate(ai.djl.basicdataset.tabular.TabularDataset dataset)Generates the network using the supplied dataset.adams.flow.core.ActorgetFlowContext()Returns the flow context.StringgetQuickInfo()Returns a quick info about the object, which can be displayed in the GUI.booleanrequiresFlowContext()Returns whether flow context is required.voidsetFlowContext(adams.flow.core.Actor value)Sets the flow context.-
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
-
-
-
-
Method Detail
-
setFlowContext
public void setFlowContext(adams.flow.core.Actor value)
Sets the flow context.- Specified by:
setFlowContextin interfaceadams.flow.core.FlowContextHandler- Parameters:
value- the context
-
getFlowContext
public adams.flow.core.Actor getFlowContext()
Returns the flow context.- Specified by:
getFlowContextin interfaceadams.flow.core.FlowContextHandler- Returns:
- the context, null if not available
-
requiresFlowContext
public boolean requiresFlowContext()
Returns whether flow context is required.
Default implementation returns false.- Specified by:
requiresFlowContextin interfaceNetworkGenerator- Returns:
- true if required
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfoin interfaceadams.core.QuickInfoSupporter- Returns:
- null if no info available, otherwise short string
-
check
protected String check(ai.djl.basicdataset.tabular.TabularDataset dataset)
Checks the dataset before generating the network.- Parameters:
dataset- the dataset to generate the network for- Returns:
- null if checks passed, otherwise error message
-
doGenerate
protected abstract ai.djl.nn.Block doGenerate(ai.djl.basicdataset.tabular.TabularDataset dataset)
Generates the network using the supplied dataset.- Parameters:
dataset- the dataset to generate the network for- Returns:
- the network
-
generate
public ai.djl.nn.Block generate(ai.djl.basicdataset.tabular.TabularDataset dataset)
Generates the network using the supplied dataset.- Specified by:
generatein interfaceNetworkGenerator- Parameters:
dataset- the dataset to generate the network for- Returns:
- the network
-
-