Package adams.data.spreadsheet.filter
Class AbstractTrainableSpreadSheetFilter
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.spreadsheet.filter.AbstractSpreadSheetFilter
-
- adams.data.spreadsheet.filter.AbstractTrainableSpreadSheetFilter
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,SizeOfHandler,SpreadSheetFilter,TrainableSpreadSheetFilter,Serializable
- Direct Known Subclasses:
Normalize,Standardize,WekaFilter
public abstract class AbstractTrainableSpreadSheetFilter extends AbstractSpreadSheetFilter implements TrainableSpreadSheetFilter
Ancestor for trainable spreadsheet filters.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_Trainedwhether the filter has been trained.-
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 AbstractTrainableSpreadSheetFilter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected StringcheckTrain(SpreadSheet data)Hook method for checks (training data).protected abstract SpreadSheetdoTrain(SpreadSheet data)Performs the actual retraining on the spreadsheet.SpreadSheetfilter(SpreadSheet data)Filters the spreadsheet.booleanisTrained()Returns whether the filter has been trained.voidresetFilter()Invalidates the training.SpreadSheettrain(SpreadSheet data)(Re-)Trains on the spreadsheet.-
Methods inherited from class adams.data.spreadsheet.filter.AbstractSpreadSheetFilter
check, doFilter, getQuickInfo
-
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.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
resetFilter
public void resetFilter()
Invalidates the training.- Specified by:
resetFilterin interfaceTrainableSpreadSheetFilter
-
isTrained
public boolean isTrained()
Returns whether the filter has been trained.- Specified by:
isTrainedin interfaceTrainableSpreadSheetFilter- Returns:
- true if trained
-
checkTrain
protected String checkTrain(SpreadSheet data)
Hook method for checks (training data).- Parameters:
data- the spreadsheet to filter- Returns:
- the filtered spreadsheet
-
doTrain
protected abstract SpreadSheet doTrain(SpreadSheet data) throws Exception
Performs the actual retraining on the spreadsheet.- Parameters:
data- the spreadsheet to train with and filter- Returns:
- the filtered spreadsheet
- Throws:
Exception- if filtering fails
-
train
public SpreadSheet train(SpreadSheet data) throws Exception
(Re-)Trains on the spreadsheet.- Specified by:
trainin interfaceTrainableSpreadSheetFilter- Parameters:
data- the spreadsheet to train with and filter- Returns:
- the filtered spreadsheet
- Throws:
Exception- if filtering fails
-
filter
public SpreadSheet filter(SpreadSheet data) throws Exception
Filters the spreadsheet.- Specified by:
filterin interfaceSpreadSheetFilter- Overrides:
filterin classAbstractSpreadSheetFilter- Parameters:
data- the spreadsheet to filter- Returns:
- the filtered spreadsheet
- Throws:
Exception- if filtering fails
-
-