stat_op
Notedocblock
stat_op(data; chart_choice, m=3, d=1, add_noise=false)
stat_op(data, lam; chart_choice, m=3, d=1, add_noise=false)Compute the ordinal-pattern chart statistic for the time series data. The ordinal patterns are indexed via the Lehmer code (see perm_to_lehm_idx!).
The first method computes the statistic once for the whole series and returns the vector [stat, p_rel], where stat is the chart statistic and p_rel the vector of relative ordinal-pattern frequencies.
The second method additionally applies EWMA smoothing with parameter lam (Equation (5) in Weiß and Testik (2023)) and returns the tuple (stats_all, p_rel), where stats_all contains the sequentially computed EWMA chart statistics.
data: time series (vector).lam::Float64: smoothing parameter of the EWMA statistic.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.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 (recommended for discrete-valued series).