Class StdDev
-
- All Implemented Interfaces:
Destroyable
,ErrorProvider
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class StdDev extends AbstractNumericOutlierDetector
Standard deviation based detector.
If difference between actual/predicted is more than the factor of standard deviations away from the mean, then the point gets flagged as outlier.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-factor <double> (property: factor) The factor which determines whether a value is an outlier. default: 2.0 minimum: 0.0
-use-relative <boolean> (property: useRelative) If enabled, relative values (divided by actual) are used instead of absolute ones. default: false
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected double
m_Factor
the stdev factor.protected boolean
m_UseRelative
whether to use relative values instead of absolute ones.-
Fields inherited from class adams.flow.control.removeoutliers.AbstractOutlierDetector
m_LastError
-
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 StdDev()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
defineOptions()
Adds options to the internal list of options.protected Set<Integer>
doDetect(SpreadSheet sheet, SpreadSheetColumnIndex actual, SpreadSheetColumnIndex predicted)
Performs the actual detection of the outliers.String
factorTipText()
Returns the tip text for this property.double
getFactor()
Returns the factor which determines whether a value is an outlier.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.boolean
getUseRelative()
Returns whether to use relative values (divided by actual) rather than absolute ones.String
globalInfo()
Returns a string describing the object.void
setFactor(double value)
Sets the factor which determines whether a value is an outlier.void
setUseRelative(boolean value)
Sets whether to use relative values (divided by actual) rather than absolute ones.String
useRelativeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.flow.control.removeoutliers.AbstractNumericOutlierDetector
check, diff, diff, extractColumn
-
Methods inherited from class adams.flow.control.removeoutliers.AbstractOutlierDetector
detect, getLastError, hasLastError
-
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
-
Methods inherited from class java.lang.Object
clone, equals, 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
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfo
in interfaceQuickInfoSupporter
- Overrides:
getQuickInfo
in classAbstractOutlierDetector
- Returns:
- null if no info available, otherwise short string
-
setFactor
public void setFactor(double value)
Sets the factor which determines whether a value is an outlier.- Parameters:
value
- the factor
-
getFactor
public double getFactor()
Returns the factor which determines whether a value is an outlier.- Returns:
- the factor
-
factorTipText
public String factorTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setUseRelative
public void setUseRelative(boolean value)
Sets whether to use relative values (divided by actual) rather than absolute ones.- Parameters:
value
- true if relative
-
getUseRelative
public boolean getUseRelative()
Returns whether to use relative values (divided by actual) rather than absolute ones.- Returns:
- true if relative
-
useRelativeTipText
public String useRelativeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doDetect
protected Set<Integer> doDetect(SpreadSheet sheet, SpreadSheetColumnIndex actual, SpreadSheetColumnIndex predicted)
Performs the actual detection of the outliers.- Specified by:
doDetect
in classAbstractOutlierDetector
- Parameters:
sheet
- the spreadsheet to analyzeactual
- the column with the actual valuespredicted
- the column with the predicted values- Returns:
- the row indices of the outliers
-
-