Package adams.data.weka.rowfinder
Class AbstractTrainableRowFinder
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.weka.rowfinder.AbstractRowFinder
-
- adams.data.weka.rowfinder.AbstractTrainableRowFinder
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<RowFinder>
,SizeOfHandler
,RowFinder
,TrainableRowFinder
,Serializable
- Direct Known Subclasses:
AbstractFilteredRowFinder
,FilteredIQR
,MultiRowFinder
public abstract class AbstractTrainableRowFinder extends AbstractRowFinder implements TrainableRowFinder
Ancestor forRowFinder
algorithms that can be trained.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Trained
whether the row finder was trained already.-
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 AbstractTrainableRowFinder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
check(weka.core.Instances data)
Checks the data.protected abstract boolean
doTrainRowFinder(weka.core.Instances data)
Performs the actual training of the row finder with the specified dataset.boolean
isRowFinderTrained()
Checks whether the row finder has been trained.protected void
reset()
Resets the object, including the trained state.boolean
trainRowFinder(weka.core.Instances data)
Trains the row finder with the specified dataset.-
Methods inherited from class adams.data.weka.rowfinder.AbstractRowFinder
arrayToHashSet, compareTo, doFindRows, equals, findRows, forCommandLine, forName, getRowFinders, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
reset
protected void reset()
Resets the object, including the trained state.- Overrides:
reset
in classAbstractOptionHandler
-
doTrainRowFinder
protected abstract boolean doTrainRowFinder(weka.core.Instances data)
Performs the actual training of the row finder with the specified dataset.- Parameters:
data
- the training data- Returns:
- true if successfully trained
-
trainRowFinder
public boolean trainRowFinder(weka.core.Instances data)
Trains the row finder with the specified dataset.- Specified by:
trainRowFinder
in interfaceTrainableRowFinder
- Parameters:
data
- the training data- Returns:
- true if successfully trained
-
isRowFinderTrained
public boolean isRowFinderTrained()
Checks whether the row finder has been trained.- Specified by:
isRowFinderTrained
in interfaceTrainableRowFinder
- Returns:
- true if the row finder has been trained already
-
check
protected void check(weka.core.Instances data)
Checks the data.
Trains the row finder with the given data if not yet trained.- Overrides:
check
in classAbstractRowFinder
- Parameters:
data
- the data to check
-
-