Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
kahaaga committed Oct 18, 2022
1 parent 9b9b073 commit 7a793bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/src/complexity_measures.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Complexity API](@id complexity_measures)
# [Complexity measures API](@id complexity_measures)

```@docs
complexity
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Thus, any of the implemented [probabilities estimators](@ref probabilities_estim

Other complexity measures, which strictly speaking don't compute entropies, and may or may not explicitly compute probability distributions, appear in the [Complexity measures](@ref complexity_measures) section.

## Input data for Entropies.jl
## [Input data for Entropies.jl](@id input_data)

The input data type typically depend on the probability estimator chosen. In general though, the standard DynamicalSystems.jl approach is taken and as such we have three types of input data:

Expand Down
20 changes: 8 additions & 12 deletions src/complexity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,28 @@ export complexity_normalized
"""
ComplexityMeasure
Abstract type for (entropy-like) complexity measures.
Supertype for (entropy-like) complexity measures.
"""
abstract type ComplexityMeasure end

"""
complexity(c::ComplexityMeasure, x)
Estimate the complexity measure `c` for input data `x`, where `c` can be any of the
following measures:
Estimate the complexity measure `c` for [input data](@ref input_data) `x`, where `c` can
be any of the following measures:
- [`ReverseDispersion`](@ref).
"""
function complexity end

"""
complexity_normalized(c::ComplexityMeasure, x) → m ∈ [a, b]
Estimate the normalized complexity measure `c` for input data `x`, where `c` can
can be any of the following measures:
- [`ReverseDispersion`](@ref).
The potential range `[a, b]` of the output value depends on `c`. See the documentation
strings for the individual measures to get the normalized ranges.
Estimate the [`complexity`](@ref) measure `c` for [input data](@ref input_data) `x`,
normalized to the interval `[a, b]`, where `[a, b]` depends on `c`.
"""
function complexity_normalized end
function complexity_normalized(c::C, args...; kwargs...) where {C <: ComplexityMeasure}
throw(ArgumentError("complexity_normalized not implemented for $C."))
end

include("complexity_measures/complexity_measures.jl")

0 comments on commit 7a793bf

Please sign in to comment.