adams.data.weka.predictions
Class FixedSizeErrorScaler

java.lang.Object
  extended by adams.core.ConsoleObject
      extended by adams.core.option.AbstractOptionHandler
          extended by adams.data.weka.predictions.AbstractErrorScaler
              extended by adams.data.weka.predictions.FixedSizeErrorScaler
All Implemented Interfaces:
Debuggable, Destroyable, OptionHandler, SizeOfHandler, Serializable, weka.core.CapabilitiesHandler

public class FixedSizeErrorScaler
extends AbstractErrorScaler

Scales the errors to a fixed size.

Valid options are:

-size <int> (property: size)
    The size of the errors after scaling.
    default: 4
    minimum: 1
 

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

Field Summary
protected  int m_Size
          the size.
 
Fields inherited from class adams.core.option.AbstractOptionHandler
m_DebugLevel, m_OptionManager
 
Constructor Summary
FixedSizeErrorScaler()
           
 
Method Summary
 void defineOptions()
          Adds options to the internal list of options.
 weka.core.Capabilities getCapabilities()
          Returns the capabilities of this object.
 int getSize()
          Returns the size for the errors.
 String globalInfo()
          Returns a string describing the object.
 ArrayList<Integer> scale(ArrayList data)
          Scales the errors.
 void setSize(int value)
          Sets the size for the errors.
 String sizeTipText()
          Returns the tip text for this property.
 
Methods inherited from class adams.data.weka.predictions.AbstractErrorScaler
compareTo, equals, forCommandLine, forName, getErrorScalers, shallowCopy, shallowCopy, toString
 
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, reset, setDebugLevel, toCommandLine
 
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_Size

protected int m_Size
the size.

Constructor Detail

FixedSizeErrorScaler

public FixedSizeErrorScaler()
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

setSize

public void setSize(int value)
Sets the size for the errors.

Parameters:
value - the size

getSize

public int getSize()
Returns the size for the errors.

Returns:
the size

sizeTipText

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

Returns:
tip text for this property suitable for displaying in the GUI or for listing the options.

getCapabilities

public weka.core.Capabilities getCapabilities()
Returns the capabilities of this object. Returns what types of classes the scaler can handle.

Specified by:
getCapabilities in interface weka.core.CapabilitiesHandler
Specified by:
getCapabilities in class AbstractErrorScaler
Returns:
the capabilities of this object
See Also:
Capabilities

scale

public ArrayList<Integer> scale(ArrayList data)
Scales the errors.

Specified by:
scale in class AbstractErrorScaler
Parameters:
data - the data containing the errors to scale
Returns:
the scaled errors


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