Package adams.data.evaluator.instance
Class AbstractNearestNeighborBasedEvaluator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.evaluator.instance.AbstractEvaluator
-
- adams.data.evaluator.instance.AbstractSerializableEvaluator
-
- adams.data.evaluator.instance.AbstractNearestNeighborBasedEvaluator
-
- All Implemented Interfaces:
adams.core.CleanUpHandler,adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SerializableObject,adams.core.ShallowCopySupporter<Evaluator>,adams.core.SizeOfHandler,Evaluator,Serializable,Comparable
- Direct Known Subclasses:
CrossValidatedNeighborHood,CrossValidatedPrediction,DistanceToCenter,DistanceToClosest
public abstract class AbstractNearestNeighborBasedEvaluator extends AbstractSerializableEvaluator
Ancestor for evaluators that use a nearest neighbor search.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected weka.core.neighboursearch.NearestNeighbourSearchm_ActualSearchthe actual nearest neighbor algorithm in use.protected weka.core.Instancesm_Headerthe header of the training data.protected weka.core.neighboursearch.NearestNeighbourSearchm_Searchthe nearest neighbor algorithm to use.protected weka.core.Instancesm_TrainingDatathe training data.-
Fields inherited from class adams.data.evaluator.instance.AbstractSerializableEvaluator
m_OverrideSerializationFile, m_SerializableObjectHelper, m_SerializationFile
-
Fields inherited from class adams.data.evaluator.instance.AbstractEvaluator
DEFAULT_METRIC, m_MissingEvaluation
-
-
Constructor Summary
Constructors Constructor Description AbstractNearestNeighborBasedEvaluator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcleanUp()Cleans up data structures, frees up memory.voiddefineOptions()Adds options to the internal list of options.protected floatgetDefaultMissingEvaluation()Returns the default value in case of missing evaluations.protected abstract weka.core.neighboursearch.NearestNeighbourSearchgetDefaultSearch()Returns the default search algorithm to use.weka.core.neighboursearch.NearestNeighbourSearchgetSearch()Returns the nearest neighbor search algorithm.protected booleaninitSearch(weka.core.Instances data)Initializes the search algorithm.voidinitSerializationSetup()Regenerates all the objects that are necessary for serialization.StringsearchTipText()Returns the tip text for this property.voidsetSearch(weka.core.neighboursearch.NearestNeighbourSearch value)Sets the nearest neighbor search algorithm.-
Methods inherited from class adams.data.evaluator.instance.AbstractSerializableEvaluator
destroy, getOverrideSerializedFile, getSerializationFile, initialize, isSetupLoadedOrGenerated, overrideSerializedFileTipText, preCheck, reset, serializationFileTipText, setLoggingLevel, setOverrideSerializedFile, setSerializationFile, setSetupLoadedOrGenerated
-
Methods inherited from class adams.data.evaluator.instance.AbstractEvaluator
build, compareTo, equals, evaluate, forCommandLine, forName, getEvaluators, getMissingEvaluation, missingEvaluationTipText, performBuild, performEvaluate, performMultiEvaluate, preCheck, setMissingEvaluation, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, 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
-
-
-
-
Field Detail
-
m_Search
protected weka.core.neighboursearch.NearestNeighbourSearch m_Search
the nearest neighbor algorithm to use.
-
m_ActualSearch
protected weka.core.neighboursearch.NearestNeighbourSearch m_ActualSearch
the actual nearest neighbor algorithm in use.
-
m_TrainingData
protected weka.core.Instances m_TrainingData
the training data.
-
m_Header
protected weka.core.Instances m_Header
the header of the training data.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractSerializableEvaluator
-
getDefaultSearch
protected abstract weka.core.neighboursearch.NearestNeighbourSearch getDefaultSearch()
Returns the default search algorithm to use.- Returns:
- the default
-
setSearch
public void setSearch(weka.core.neighboursearch.NearestNeighbourSearch value)
Sets the nearest neighbor search algorithm.- Parameters:
value- the algorithm
-
getSearch
public weka.core.neighboursearch.NearestNeighbourSearch getSearch()
Returns the nearest neighbor search algorithm.- Returns:
- the algorithm
-
searchTipText
public String searchTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getDefaultMissingEvaluation
protected float getDefaultMissingEvaluation()
Returns the default value in case of missing evaluations.- Specified by:
getDefaultMissingEvaluationin classAbstractEvaluator- Returns:
- the default value
-
initSearch
protected boolean initSearch(weka.core.Instances data)
Initializes the search algorithm.- Parameters:
data- the data to initialize the search with- Returns:
- true if successfully initialized
-
initSerializationSetup
public void initSerializationSetup()
Regenerates all the objects that are necessary for serialization.
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.
-
-