monitor_op
Notedocblock
monitor_op(data, lam, cl; chart_choice, m=3, d=1, add_noise=false)Monitor the time series data with the EWMA control chart based on ordinal patterns and return a ControlChartResult with the chart statistics, the control limit and the first alarm.
The statistics are those of stat_op(data, lam; ...), and the alarm rule is the one of the chart: the chart signals when the statistic falls below cl for Shannon() and ShannonExtropy(), exceeds cl for DistanceToWhiteNoise(), and exceeds cl in absolute value for the four statistics of Bandt (2019).
data: the time series.lam::Float64: EWMA smoothing parameter.cl::Float64: control limit, typically obtained fromcl_op.chart_choice: one ofShannon(),ShannonExtropy(),DistanceToWhiteNoise(),UpDownBalance(),Persistence(),RotationalAsymmetry(),UpDownScaling(). ForShannonandShannonExtropy, the statistic is in the logarithm base of the chart, which must be larger than 1. Both default to base 2 in ComplexityMeasures.jl; useShannon(base=exp(1))for the natural logarithm used in the papers. The control limitclmust be given in the same base.m::Int=3: length of the ordinal patterns.d::Int=1: delay between observations of a pattern.add_noise::Bool=false: add uniform noise todatato break ties.
x = randn(400)
res = monitor_op(x, 0.1, 0.25; chart_choice=Persistence())
res.alarm # position of the first signal in res.stats, or nothing