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 intm_BuildWaitthe build wait time in msec.protected floatm_EvalMaxthe maximum to use for the evaluations.protected floatm_EvalMinthe minimum to use for the evaluations.protected intm_EvalWaitthe eval wait time in msec.protected Randomm_Randomfor generating the random numbers.protected longm_Seedthe 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 StringbuildWaitTipText()Returns the tip text for this property.voidcleanUp()Cleans up data structures, frees up memory.voiddefineOptions()Adds options to the internal list of options.StringevalMaxTipText()Returns the tip text for this property.StringevalMinTipText()Returns the tip text for this property.StringevalWaitTipText()Returns the tip text for this property.intgetBuildWait()Returns the time in msec to wait when calling buildClassifier.protected floatgetDefaultMissingEvaluation()Returns the default value in case of missing evaluations.floatgetEvalMax()Returns the maximum value to output.floatgetEvalMin()Returns the minimum value to output.intgetEvalWait()Returns the time in msec to wait when calling classifyInstance.protected RandomgetRandom()Returns the random number generator to use.longgetSeed()Returns the seed value for the random values.StringglobalInfo()Returns a string describing the object.protected booleanperformBuild(weka.core.Instances data)Builds the evaluator.protected FloatperformEvaluate(weka.core.Instance data)Performs the actual evaluation.StringseedTipText()Returns the tip text for this property.voidsetBuildWait(int value)Sets the time in msec to wait when calling buildClassifier.voidsetEvalMax(float value)Sets the maximum value to output.voidsetEvalMin(float value)Sets the minimum value to output.voidsetEvalWait(int value)Sets the time in msec to wait when calling classifyInstance.voidsetSeed(long value)Sets the seed value for the random values.protected voidwait(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:
globalInfoin interfaceadams.core.GlobalInfoSupporter- Specified by:
globalInfoin 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:
defineOptionsin interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classAbstractEvaluator
-
setSeed
public void setSeed(long value)
Sets the seed value for the random values.- Specified by:
setSeedin interfaceadams.core.Randomizable- Parameters:
value- the seed
-
getSeed
public long getSeed()
Returns the seed value for the random values.- Specified by:
getSeedin interfaceadams.core.Randomizable- Returns:
- the seed
-
seedTipText
public String seedTipText()
Returns the tip text for this property.- Specified by:
seedTipTextin 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:
getDefaultMissingEvaluationin 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:
performEvaluatein classAbstractEvaluator- Parameters:
data- the instance to check- Returns:
- always 1.0
-
performBuild
protected boolean performBuild(weka.core.Instances data)
Builds the evaluator.- Specified by:
performBuildin 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:
cleanUpin interfaceadams.core.CleanUpHandler
-
-