JuliaDynamics / ComplexityMeasures.jl

Estimators for probabilities, entropies, and other complexity measures derived from data in the context of nonlinear dynamics and complex systems
MIT License
48 stars 11 forks source link

Docstring and implementation for Statistical Complexity is wrong #368

Closed Datseris closed 5 months ago

Datseris commented 5 months ago

https://juliadynamics.github.io/DynamicalSystemsDocs.jl/complexitymeasures/stable/complexity/#ComplexityMeasures.StatisticalComplexity

in three places:

  1. It uses est::ProbabilitiesEstimator = RelativeAmount(OrdinalPatterns()): which is invalid syntax.
  2. It does not explain why [x] (the input timeseries) should be given.
  3. There is a typo: image

Actually, number 1 means that the method can't even be used:

julia> StatisticalComplexity()
ERROR: MethodError: no method matching RelativeAmount(::OrdinalPatterns{3, typeof(ComplexityMeasures.isless_rand)})

Closest candidates are:
  RelativeAmount()
   @ ComplexityMeasures C:\Users\gd419\.julia\packages\ComplexityMeasures\XtN8O\src\probabilities_estimators\RelativeAmount.jl:41

Stacktrace:
 [1] StatisticalComplexity()
   @ ComplexityMeasures C:\Users\gd419\.julia\packages\ComplexityMeasures\XtN8O\src\complexity_measures\statistical_complexity.jl:71
 [2] top-level scope
   @ REPL[28]:1

which means we didn't put in a test for it!!!

kahaaga commented 5 months ago

Good catch.

I'll take the opportunity to rename a few of the keyword arguments and add a deprecation for it, because the keywords no longer match the distinction between probabilities estimator and outcome space.