Package adams.data.spc
Class MOACUSUM
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,TechnicalInformationHandler
,ControlChart
,IndividualsControlChart
,Serializable
public class MOACUSUM extends AbstractControlChart implements IndividualsControlChart
CUSUM (cumulative sum control chart) is a sequential analysis technique developed by E. S. Page of the University of Cambridge.
For more information see:
E. S. Page. CUSUM. URL https://en.wikipedia.org/wiki/CUSUM.
This version is based on MOA's drift detector:
https://github.com/apache/incubator-samoa/blob/9b178f63152e5b4c262e0f3ed28e77667832fc98/samoa-api/src/main/java/org/apache/samoa/moa/classifiers/core/driftdetection/CusumDM.java
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-min-num-values <int> (property: minNumValues) The minimum number of values to process before testing. default: 30 minimum: 1
-delta <double> (property: delta) The delta parameter. default: 0.05 minimum: 0.0
-lambda <double> (property: lambda) The threshold for the test. default: 4.0 minimum: 0.0
- 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_Delta
the delta parameter.protected double
m_Lambda
the lambda parameter.protected int
m_MinNumValues
the minimum number of values before testing.-
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 MOACUSUM()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Limits>
calculate(Number[] data)
Calculates center/lower/upper limit.void
defineOptions()
Adds options to the internal list of options.String
deltaTipText()
Returns the tip text for this property.double
getDelta()
Returns the delta parameter.double
getLambda()
Returns the threshold for the test.int
getMinNumValues()
Returns the minimum number of values to process before testing.String
getName()
Returns the chart name.TechnicalInformation
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.String
globalInfo()
Returns a string describing the object.String
lambdaTipText()
Returns the tip text for this property.String
minNumValuesTipText()
Returns the tip text for this property.double[]
prepare(Number[] data)
Prepares the data.void
setDelta(double value)
Sets the delta parameter.void
setLambda(double value)
Sets the threshold for the test.void
setMinNumValues(int value)
Sets the minimum number of values to process before testing.-
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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager, toCommandLine
-
-
-
-
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
-
getName
public String getName()
Returns the chart name.- Specified by:
getName
in interfaceControlChart
- Returns:
- the chart name
-
getTechnicalInformation
public TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- Specified by:
getTechnicalInformation
in interfaceTechnicalInformationHandler
- Returns:
- the technical information about this class
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setMinNumValues
public void setMinNumValues(int value)
Sets the minimum number of values to process before testing.- Parameters:
value
- the number of values
-
getMinNumValues
public int getMinNumValues()
Returns the minimum number of values to process before testing.- Returns:
- the number of values
-
minNumValuesTipText
public String minNumValuesTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setDelta
public void setDelta(double value)
Sets the delta parameter.- Parameters:
value
- the delta
-
getDelta
public double getDelta()
Returns the delta parameter.- Returns:
- the delta
-
deltaTipText
public String deltaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setLambda
public void setLambda(double value)
Sets the threshold for the test.- Parameters:
value
- the threshold
-
getLambda
public double getLambda()
Returns the threshold for the test.- Returns:
- the threshold
-
lambdaTipText
public String lambdaTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
calculate
public List<Limits> calculate(Number[] data)
Calculates center/lower/upper limit.- Specified by:
calculate
in interfaceIndividualsControlChart
- Parameters:
data
- the data to use for the calculation- Returns:
- center/lower/upper
-
prepare
public double[] prepare(Number[] data)
Prepares the data.- Specified by:
prepare
in interfaceIndividualsControlChart
- Parameters:
data
- the data to prepare- Returns:
- the prepared/processed data
-
-