Class MultiOutlierDetector
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.control.removeoutliers.AbstractOutlierDetector
-
- adams.flow.control.removeoutliers.MultiOutlierDetector
-
- All Implemented Interfaces:
Destroyable
,ErrorProvider
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,QuickInfoSupporter
,SizeOfHandler
,Serializable
public class MultiOutlierDetector extends AbstractOutlierDetector
Applies the specified outlier detectors sequentially and combines the detected outliers either via union or intersect.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-detector <adams.flow.control.removeoutliers.AbstractOutlierDetector> [-detector ...] (property: detectors) The detectors to apply sequentially. default:
-combination <UNION|INTERSECT> (property: combination) How to combine the outliers from the various detectors. default: UNION
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiOutlierDetector.Combination
Enumeration of how to combine the outliers.
-
Field Summary
Fields Modifier and Type Field Description protected MultiOutlierDetector.Combination
m_Combination
how to combine the outliers.protected AbstractOutlierDetector[]
m_Detectors
outlier detectors to apply.-
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 MultiOutlierDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
check(SpreadSheet sheet, SpreadSheetColumnIndex actual, SpreadSheetColumnIndex predicted)
Check method before detection.String
combinationTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.String
detectorsTipText()
Returns the tip text for this property.protected Set<Integer>
doDetect(SpreadSheet sheet, SpreadSheetColumnIndex actual, SpreadSheetColumnIndex predicted)
Performs the actual detection of the outliers.MultiOutlierDetector.Combination
getCombination()
Returns how to combine the outliers.AbstractOutlierDetector[]
getDetectors()
Returns the detectors to use.String
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.String
globalInfo()
Returns a string describing the object.void
setCombination(MultiOutlierDetector.Combination value)
Sets how to combine the outliers.void
setDetectors(AbstractOutlierDetector[] value)
Sets the detectors to use.-
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
-
-
-
-
Field Detail
-
m_Detectors
protected AbstractOutlierDetector[] m_Detectors
outlier detectors to apply.
-
m_Combination
protected MultiOutlierDetector.Combination m_Combination
how to combine the outliers.
-
-
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
-
setDetectors
public void setDetectors(AbstractOutlierDetector[] value)
Sets the detectors to use.- Parameters:
value
- the detectors
-
getDetectors
public AbstractOutlierDetector[] getDetectors()
Returns the detectors to use.- Returns:
- the detectors
-
detectorsTipText
public String detectorsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCombination
public void setCombination(MultiOutlierDetector.Combination value)
Sets how to combine the outliers.- Parameters:
value
- the combination
-
getCombination
public MultiOutlierDetector.Combination getCombination()
Returns how to combine the outliers.- Returns:
- the combination
-
combinationTipText
public String combinationTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
public String check(SpreadSheet sheet, SpreadSheetColumnIndex actual, SpreadSheetColumnIndex predicted)
Check method before detection.- Overrides:
check
in classAbstractOutlierDetector
- Parameters:
sheet
- the spreadsheet to analyzeactual
- the column with the actual valuespredicted
- the column with the predicted values- Returns:
- null if check passed, otherwise error message
-
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
-
-