Package adams.flow.transformer
Class WekaTrainTestSetEvaluator.EvaluateJob
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.multiprocess.AbstractJob
-
- adams.flow.transformer.WekaTrainTestSetEvaluator.EvaluateJob
-
- 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:
- WekaTrainTestSetEvaluator
public static class WekaTrainTestSetEvaluator.EvaluateJob extends adams.multiprocess.AbstractJob
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.classifiers.Classifier
m_Classifier
the classifier to train.protected StoppableEvaluation
m_Evaluation
the evaluation object to use.protected weka.classifiers.evaluation.output.prediction.AbstractOutput
m_Output
for collecting the output.protected weka.core.Instances
m_Test
the data to use for testing.protected weka.core.Instances
m_Train
the data to use for training.
-
Constructor Summary
Constructors Constructor Description EvaluateJob(weka.classifiers.Classifier classifier, weka.core.Instances train, weka.core.Instances test, StoppableEvaluation eval, weka.classifiers.evaluation.output.prediction.AbstractOutput output)
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.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.void
stopExecution()
Stops the execution.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
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Classifier
protected weka.classifiers.Classifier m_Classifier
the classifier to train.
-
m_Train
protected weka.core.Instances m_Train
the data to use for training.
-
m_Test
protected weka.core.Instances m_Test
the data to use for testing.
-
m_Evaluation
protected StoppableEvaluation m_Evaluation
the evaluation object to use.
-
m_Output
protected weka.classifiers.evaluation.output.prediction.AbstractOutput m_Output
for collecting the output.
-
-
Constructor Detail
-
EvaluateJob
public EvaluateJob(weka.classifiers.Classifier classifier, weka.core.Instances train, weka.core.Instances test, StoppableEvaluation eval, weka.classifiers.evaluation.output.prediction.AbstractOutput output)
Initializes the job.- Parameters:
classifier
- the classifier to traintrain
- the training datatest
- the test dataeval
- the evaluation object to useoutput
- for collecting the output
-
-
Method Detail
-
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
-
stopExecution
public void stopExecution()
Stops the execution.- Specified by:
stopExecution
in interfaceadams.core.Stoppable
- Overrides:
stopExecution
in classadams.multiprocess.AbstractJob
-
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
-
-