Package adams.data.evaluator.instance
Class FakeEvaluator
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.evaluator.instance.AbstractEvaluator
-
- adams.data.evaluator.instance.FakeEvaluator
-
- 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.Randomizable
,adams.core.ShallowCopySupporter<Evaluator>
,adams.core.SizeOfHandler
,Evaluator
,Serializable
,Comparable
public class FakeEvaluator extends AbstractEvaluator implements adams.core.Randomizable
Fake evaluator, outputs random values based on min/max values.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-missing-evaluation <float> (property: missingEvaluation) The value to use as replacement for missing evaluations. default: NaN
-build-wait <int> (property: buildWait) The time in msec to wait when calling 'performBuild'. default: 0 minimum: 0
-eval-wait <int> (property: evalWait) The time in msec to wait when calling 'performEvaluate'. default: 0 minimum: 0
-eval-min <float> (property: evalMin) The minimum value to output. default: 0.0
-eval-max <float> (property: evalMax) The maximum value to output. default: 1.0
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
m_BuildWait
the build wait time in msec.protected float
m_EvalMax
the maximum to use for the evaluations.protected float
m_EvalMin
the minimum to use for the evaluations.protected int
m_EvalWait
the eval wait time in msec.protected Random
m_Random
for generating the random numbers.protected long
m_Seed
the seed.-
Fields inherited from class adams.data.evaluator.instance.AbstractEvaluator
DEFAULT_METRIC, m_MissingEvaluation
-
-
Constructor Summary
Constructors Constructor Description FakeEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
buildWaitTipText()
Returns the tip text for this property.void
cleanUp()
Cleans up data structures, frees up memory.void
defineOptions()
Adds options to the internal list of options.String
evalMaxTipText()
Returns the tip text for this property.String
evalMinTipText()
Returns the tip text for this property.String
evalWaitTipText()
Returns the tip text for this property.int
getBuildWait()
Returns the time in msec to wait when calling buildClassifier.protected float
getDefaultMissingEvaluation()
Returns the default value in case of missing evaluations.float
getEvalMax()
Returns the maximum value to output.float
getEvalMin()
Returns the minimum value to output.int
getEvalWait()
Returns the time in msec to wait when calling classifyInstance.protected Random
getRandom()
Returns the random number generator to use.long
getSeed()
Returns the seed value for the random values.String
globalInfo()
Returns a string describing the object.protected boolean
performBuild(weka.core.Instances data)
Builds the evaluator.protected Float
performEvaluate(weka.core.Instance data)
Performs the actual evaluation.String
seedTipText()
Returns the tip text for this property.void
setBuildWait(int value)
Sets the time in msec to wait when calling buildClassifier.void
setEvalMax(float value)
Sets the maximum value to output.void
setEvalMin(float value)
Sets the minimum value to output.void
setEvalWait(int value)
Sets the time in msec to wait when calling classifyInstance.void
setSeed(long value)
Sets the seed value for the random values.protected void
wait(int msec)
Waits for a specified amount of time.-
Methods inherited from class adams.data.evaluator.instance.AbstractEvaluator
build, compareTo, equals, evaluate, forCommandLine, forName, getEvaluators, getMissingEvaluation, missingEvaluationTipText, performMultiEvaluate, preCheck, preCheck, setMissingEvaluation, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Seed
protected long m_Seed
the seed.
-
m_BuildWait
protected int m_BuildWait
the build wait time in msec.
-
m_EvalWait
protected int m_EvalWait
the eval wait time in msec.
-
m_EvalMin
protected float m_EvalMin
the minimum to use for the evaluations.
-
m_EvalMax
protected float m_EvalMax
the maximum to use for the evaluations.
-
m_Random
protected Random m_Random
for generating the random numbers.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractEvaluator
-
setSeed
public void setSeed(long value)
Sets the seed value for the random values.- Specified by:
setSeed
in interfaceadams.core.Randomizable
- Parameters:
value
- the seed
-
getSeed
public long getSeed()
Returns the seed value for the random values.- Specified by:
getSeed
in interfaceadams.core.Randomizable
- Returns:
- the seed
-
seedTipText
public String seedTipText()
Returns the tip text for this property.- Specified by:
seedTipText
in interfaceadams.core.Randomizable
- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setBuildWait
public void setBuildWait(int value)
Sets the time in msec to wait when calling buildClassifier.- Parameters:
value
- the time in msec
-
getBuildWait
public int getBuildWait()
Returns the time in msec to wait when calling buildClassifier.- Returns:
- the time in msec
-
buildWaitTipText
public String buildWaitTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setEvalWait
public void setEvalWait(int value)
Sets the time in msec to wait when calling classifyInstance.- Parameters:
value
- the time in msec
-
getEvalWait
public int getEvalWait()
Returns the time in msec to wait when calling classifyInstance.- Returns:
- the time in msec
-
evalWaitTipText
public String evalWaitTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setEvalMin
public void setEvalMin(float value)
Sets the minimum value to output.- Parameters:
value
- the minimum value
-
getEvalMin
public float getEvalMin()
Returns the minimum value to output.- Returns:
- the minimum value
-
evalMinTipText
public String evalMinTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setEvalMax
public void setEvalMax(float value)
Sets the maximum value to output.- Parameters:
value
- the maximum value
-
getEvalMax
public float getEvalMax()
Returns the maximum value to output.- Returns:
- the maximum value
-
evalMaxTipText
public String evalMaxTipText()
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:
getDefaultMissingEvaluation
in classAbstractEvaluator
- Returns:
- the default value
-
wait
protected void wait(int msec)
Waits for a specified amount of time.- Parameters:
msec
- the time in msec to wait
-
getRandom
protected Random getRandom()
Returns the random number generator to use.- Returns:
- the random number generator
-
performEvaluate
protected Float performEvaluate(weka.core.Instance data)
Performs the actual evaluation.- Overrides:
performEvaluate
in classAbstractEvaluator
- Parameters:
data
- the instance to check- Returns:
- always 1.0
-
performBuild
protected boolean performBuild(weka.core.Instances data)
Builds the evaluator.- Specified by:
performBuild
in classAbstractEvaluator
- Parameters:
data
- the instance to check- Returns:
- false if min/max are invalid
-
cleanUp
public void cleanUp()
Cleans up data structures, frees up memory.- Specified by:
cleanUp
in interfaceadams.core.CleanUpHandler
-
-