Package adams.data.weka.predictions
Class NumericErrorScalerWithReference
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.weka.predictions.AbstractErrorScaler
-
- adams.data.weka.predictions.NumericErrorScalerWithReference
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Serializable
,weka.core.CapabilitiesHandler
public class NumericErrorScalerWithReference extends AbstractErrorScaler
Scales the errors for numeric class attributes, using an user-specified error as reference point for a specified size.
Valid options are:
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-reference-error <double> (property: referenceError) The absolute error to use as reference for the error sizes (> 0). default: 1.0 minimum: 1.0E-5
-reference-size <int> (property: referenceSize) The size for the reference error (>= 1). default: 10 minimum: 1
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
m_ReferenceError
the reference error.protected int
m_ReferenceSize
the reference size.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description NumericErrorScalerWithReference()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.weka.core.Capabilities
getCapabilities()
Returns the capabilities of this object.double
getReferenceError()
Returns the absolute value of the reference error.int
getReferenceSize()
Returns the size for the reference error.String
globalInfo()
Returns a string describing the object.String
referenceErrorTipText()
Returns the tip text for this property.String
referenceSizeTipText()
Returns the tip text for this property.ArrayList
scale(ArrayList data)
Scales the errors.void
setReferenceError(double value)
Sets the absolute value of the reference error.void
setReferenceSize(int value)
Sets the size for the reference error.-
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, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine
-
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
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- 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 interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setReferenceError
public void setReferenceError(double value)
Sets the absolute value of the reference error.- Parameters:
value
- the error
-
getReferenceError
public double getReferenceError()
Returns the absolute value of the reference error.- Returns:
- the error
-
referenceErrorTipText
public String referenceErrorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setReferenceSize
public void setReferenceSize(int value)
Sets the size for the reference error.- Parameters:
value
- the size
-
getReferenceSize
public int getReferenceSize()
Returns the size for the reference error.- Returns:
- the size
-
referenceSizeTipText
public String referenceSizeTipText()
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 interfaceweka.core.CapabilitiesHandler
- Specified by:
getCapabilities
in classAbstractErrorScaler
- Returns:
- the capabilities of this object
- See Also:
Capabilities
-
scale
public ArrayList scale(ArrayList data)
Scales the errors.- Specified by:
scale
in classAbstractErrorScaler
- Parameters:
data
- the data containing the errors to scale- Returns:
- the scaled errors
-
-