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.
data::Union{SubArray,Matrix{<:Real}}: A 2D array of data.d1::Int: The delay value for the rows.d2::Int: The delay value for the columns.chart_choice: one ofTauHat(),KappaHat(),TauTilde(),KappaTilde(),Shannon(),ShannonExtropy(),DistanceToWhiteNoise(). 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.refinement:OrdinaryType()for the classical SOP classification, or one ofRotationType(),DirectionType(),DiagonalType().add_noise::Bool: A boolean value to add noise to the data.noise_dist::UnivariateDistribution: The distribution for the noise.
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 ofTauHat(),KappaHat(),TauTilde(),KappaTilde(),Shannon(),ShannonExtropy(),DistanceToWhiteNoise(). 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.refinement:OrdinaryType()for the classical SOP classification, or one ofRotationType(),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 value1/q, whereqis the number of SOP types of the classification (3 or 6).