adams.data.weka.evaluator
Class NamedSetup

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.weka.evaluator.AbstractInstanceEvaluator
              extended by adams.data.weka.evaluator.NamedSetup
All Implemented Interfaces:
CleanUpHandler, Debuggable, Destroyable, OptionHandler, SizeOfHandler, Serializable

public class NamedSetup
extends AbstractInstanceEvaluator

Applies an evaluator that is referenced via its global setup name (see 'NamedSetups').

Valid options are:

-D <int> (property: debugLevel)
    The greater the number the more additional info the scheme may output to
    the console (0 = off).
    default: 0
    minimum: 0
 
-setup <java.lang.String> (property: setup)
    The name of the setup to use.
    default: name_of_setup
 

Version:
$Revision: 4584 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Field Summary
protected  AbstractInstanceEvaluator m_ActualScheme
          the actual scheme.
protected  NamedSetup m_Setup
          the name of the setup to load.
 
Fields inherited from class adams.data.weka.evaluator.AbstractInstanceEvaluator
m_Initialized
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
NamedSetup()
           
 
Method Summary
 void defineOptions()
          Adds options to the internal list of options.
protected  double doEvaluate(weka.core.Instance inst)
          Evaluates the instance using the named setup.
protected  AbstractInstanceEvaluator getActualScheme()
          Returns the named setup.
 NamedSetup getSetup()
          Returns the setup name.
 String globalInfo()
          Returns a string describing the object.
 void reset()
          Resets the filter.
 void setSetup(NamedSetup value)
          Sets the setup name.
 String setupTipText()
          Returns the tip text for this property.
 
Methods inherited from class adams.data.weka.evaluator.AbstractInstanceEvaluator
check, cleanUp, compareTo, destroy, equals, evaluate, forCommandLine, forName, getEvaluators, setUp, shallowCopy, shallowCopy
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString
 
Methods inherited from class adams.core.ConsoleObject
getDebugging, getSystemErr, getSystemOut, sizeOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Setup

protected NamedSetup m_Setup
the name of the setup to load.


m_ActualScheme

protected AbstractInstanceEvaluator m_ActualScheme
the actual scheme.

Constructor Detail

NamedSetup

public NamedSetup()
Method Detail

globalInfo

public String globalInfo()
Returns a string describing the object.

Specified by:
globalInfo in class 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 interface OptionHandler
Overrides:
defineOptions in class AbstractOptionHandler

reset

public void reset()
Resets the filter.

Overrides:
reset in class AbstractInstanceEvaluator

setSetup

public void setSetup(NamedSetup value)
Sets the setup name.

Parameters:
value - the name

getSetup

public NamedSetup getSetup()
Returns the setup name.

Returns:
the name

setupTipText

public String setupTipText()
Returns the tip text for this property.

Returns:
tip text for this property suitable for displaying in the gui

getActualScheme

protected AbstractInstanceEvaluator getActualScheme()
Returns the named setup.

Returns:
the actual scheme to use

doEvaluate

protected double doEvaluate(weka.core.Instance inst)
Evaluates the instance using the named setup.

Specified by:
doEvaluate in class AbstractInstanceEvaluator
Parameters:
inst - the instance to evaluate
Returns:
evaluation range, between 0 and 1 (0 = bad, 1 = good, -1 = if unable to evaluate)


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.