Class AbstractWekaEvaluationPostProcessor
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.wekaevaluationpostprocessor.AbstractWekaEvaluationPostProcessor
-
- 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
,Serializable
- Direct Known Subclasses:
AbstractNumericClassPostProcessor
,MultiPostProcessor
,PassThrough
public abstract class AbstractWekaEvaluationPostProcessor extends adams.core.option.AbstractOptionHandler implements adams.core.QuickInfoSupporter
Ancestor for classes that post-process Evaluation objects.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractWekaEvaluationPostProcessor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
check(WekaEvaluationContainer cont)
Checks the container whether it can be processed.protected String
check(weka.classifiers.Evaluation eval)
Checks the evaluation whether it can be processed.protected List<WekaEvaluationContainer>
doPostProcess(WekaEvaluationContainer cont)
Post-processes the evaluation container.protected abstract List<weka.classifiers.Evaluation>
doPostProcess(weka.classifiers.Evaluation eval)
Post-processes the evaluation.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.protected WekaEvaluationContainer
newContainer(String suffix, WekaEvaluationContainer cont, gnu.trove.list.TIntList indices)
Creates a new evaluation container from the specified subset of predictions.protected weka.classifiers.Evaluation
newEvaluation(String suffix, weka.classifiers.Evaluation eval, gnu.trove.list.TIntList indices)
Creates a new evaluation from the specified subset of predictions.List<WekaEvaluationContainer>
postProcess(WekaEvaluationContainer cont)
Post-processes the evaluation container.List<weka.classifiers.Evaluation>
postProcess(weka.classifiers.Evaluation eval)
Post-processes the evaluation.-
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
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
check
protected String check(WekaEvaluationContainer cont)
Checks the container whether it can be processed.
Default implementation only ensures that it is not null and predictions are present.- Parameters:
cont
- the container to check- Returns:
- null if successful, otherwise error message
-
newContainer
protected WekaEvaluationContainer newContainer(String suffix, WekaEvaluationContainer cont, gnu.trove.list.TIntList indices)
Creates a new evaluation container from the specified subset of predictions.- Parameters:
suffix
- the suffix for the relation namecont
- the container to use as basisindices
- the indices of the predictions to include in the container- Returns:
- the new container
-
doPostProcess
protected List<WekaEvaluationContainer> doPostProcess(WekaEvaluationContainer cont)
Post-processes the evaluation container.- Parameters:
cont
- the container to post-process- Returns:
- the generated evaluation containers
-
postProcess
public List<WekaEvaluationContainer> postProcess(WekaEvaluationContainer cont)
Post-processes the evaluation container.- Parameters:
cont
- the container to post-process- Returns:
- the generated evaluation containers
-
check
protected String check(weka.classifiers.Evaluation eval)
Checks the evaluation whether it can be processed.
Default implementation only ensures that it is not null and predictions are present.- Parameters:
eval
- the evaluation to check- Returns:
- null if successful, otherwise error message
-
newEvaluation
protected weka.classifiers.Evaluation newEvaluation(String suffix, weka.classifiers.Evaluation eval, gnu.trove.list.TIntList indices)
Creates a new evaluation from the specified subset of predictions.- Parameters:
suffix
- the suffix for the relation nameeval
- the Evaluation to use as basisindices
- the indices of the predictions to include in the container- Returns:
- the new container
-
doPostProcess
protected abstract List<weka.classifiers.Evaluation> doPostProcess(weka.classifiers.Evaluation eval)
Post-processes the evaluation.- Parameters:
eval
- the evaluation to post-process- Returns:
- the generated evaluations
-
postProcess
public List<weka.classifiers.Evaluation> postProcess(weka.classifiers.Evaluation eval)
Post-processes the evaluation.- Parameters:
eval
- the evaluation to post-process- Returns:
- the generated evaluations
-
-