stat_sop

Notedocblock
stat_sop(data, d1, d2; chart_choice, refinement=OrdinaryType(), add_noise=false,
  noise_dist=Uniform(0, 1))

Compute the test statistic based on spatial ordinal patterns (SOPs) for a single picture (matrix). Returns the tuple (stat, p_hat) with the chart statistic and the vector of relative SOP type frequencies.

Examples

data = rand(20, 20);

stat_sop(data, 1, 1; chart_choice=TauTilde())

Notedocblock
stat_sop(data, lam, d1, d2; chart_choice=TauTilde(), refinement=OrdinaryType(),
  add_noise=false, noise_dist=Uniform(0, 1), type_freq_init=nothing)

Compute the sequence of EWMA-smoothed test statistics based on spatial ordinal patterns (SOPs) for a 3D array of data (image sequence, third dimension = time).

  • data::Array{Float64,3}: A 3D array of data.
  • lam::Float64: The lambda value for the EWMA.
  • d1::Int: The delay value for the rows.
  • d2::Int: The delay value for the columns.
  • chart_choice: one of TauHat(), KappaHat(), TauTilde(), KappaTilde(), Shannon(), ShannonExtropy(), DistanceToWhiteNoise(). For Shannon and ShannonExtropy, the statistic is in the logarithm base of the chart, which must be larger than 1. Both default to base 2 in ComplexityMeasures.jl; use Shannon(base=exp(1)) for the natural logarithm used in the papers.
  • refinement: OrdinaryType() for the classical SOP classification, or one of RotationType(), DirectionType(), DiagonalType().
  • add_noise::Bool: A boolean value to add noise to the data.
  • noise_dist::UnivariateDistribution: The distribution for the noise.
  • type_freq_init: The initial type frequencies. Defaults to the uniform value 1/q, where q is the number of SOP types of the classification (3 or 6).