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 classMultiOutlierDetector.CombinationEnumeration of how to combine the outliers.
-
Field Summary
Fields Modifier and Type Field Description protected MultiOutlierDetector.Combinationm_Combinationhow to combine the outliers.protected AbstractOutlierDetector[]m_Detectorsoutlier 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 Stringcheck(SpreadSheet sheet, SpreadSheetColumnIndex actual, SpreadSheetColumnIndex predicted)Check method before detection.StringcombinationTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.StringdetectorsTipText()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.CombinationgetCombination()Returns how to combine the outliers.AbstractOutlierDetector[]getDetectors()Returns the detectors to use.StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.StringglobalInfo()Returns a string describing the object.voidsetCombination(MultiOutlierDetector.Combination value)Sets how to combine the outliers.voidsetDetectors(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:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin 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:
checkin 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:
doDetectin 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
-
-