Package adams.flow.transformer
Class WekaTrainClusterer.BatchTrainJob
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.multiprocess.AbstractJob
-
- adams.flow.transformer.WekaTrainClusterer.BatchTrainJob
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,adams.core.Stoppable
,adams.core.StoppableWithFeedback
,adams.multiprocess.Job
,Serializable
- Enclosing class:
- WekaTrainClusterer
public static class WekaTrainClusterer.BatchTrainJob extends adams.multiprocess.AbstractJob
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.clusterers.Clusterer
m_Clusterer
the clusterer to train.protected WekaModelContainer
m_Container
the generated model container.protected weka.core.Instances
m_Data
the data to use for training.protected AbstractClustererPostProcessor
m_PostProcessor
the postprocessor.
-
Constructor Summary
Constructors Constructor Description BatchTrainJob(weka.clusterers.Clusterer cls, weka.core.Instances data, AbstractClustererPostProcessor postProcessor)
Initializes the job.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up data structures, frees up memory.WekaModelContainer
getContainer()
Returns the generated model container.protected String
postProcessCheck()
Checks whether all post-conditions have been met.protected String
preProcessCheck()
Checks whether all pre-conditions have been met.protected void
process()
Does the actual execution of the job.String
toString()
Returns a string representation of this job.-
Methods inherited from class adams.multiprocess.AbstractJob
execute, getAdditionalErrorInformation, getExecutionError, getJobCompleteListener, getJobInfo, getProgressInfo, hasExecutionError, isComplete, isStopped, jobCompleted, setJobCompleteListener, setJobInfo, setProgressInfo, stopExecution
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Clusterer
protected weka.clusterers.Clusterer m_Clusterer
the clusterer to train.
-
m_Data
protected weka.core.Instances m_Data
the data to use for training.
-
m_PostProcessor
protected AbstractClustererPostProcessor m_PostProcessor
the postprocessor.
-
m_Container
protected WekaModelContainer m_Container
the generated model container.
-
-
Constructor Detail
-
BatchTrainJob
public BatchTrainJob(weka.clusterers.Clusterer cls, weka.core.Instances data, AbstractClustererPostProcessor postProcessor)
Initializes the job.- Parameters:
cls
- the clusterer to traindata
- the training datapostProcessor
- the post-processor to use
-
-
Method Detail
-
getContainer
public WekaModelContainer getContainer()
Returns the generated model container.- Returns:
- the container, null if none available
-
preProcessCheck
protected String preProcessCheck()
Checks whether all pre-conditions have been met.- Specified by:
preProcessCheck
in classadams.multiprocess.AbstractJob
- Returns:
- null if everything is OK, otherwise an error message
-
process
protected void process() throws Exception
Does the actual execution of the job.- Specified by:
process
in classadams.multiprocess.AbstractJob
- Throws:
Exception
- if fails to execute job
-
postProcessCheck
protected String postProcessCheck()
Checks whether all post-conditions have been met.- Specified by:
postProcessCheck
in classadams.multiprocess.AbstractJob
- Returns:
- null if everything is OK, otherwise an error message
-
toString
public String toString()
Returns a string representation of this job.- Specified by:
toString
in classadams.multiprocess.AbstractJob
- Returns:
- the job as string
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory. Removes dependencies and job parameters.- Specified by:
cleanUp
in interfaceadams.core.CleanUpHandler
- Specified by:
cleanUp
in interfaceadams.multiprocess.Job
- Overrides:
cleanUp
in classadams.multiprocess.AbstractJob
-
-