Skip to content

Commit 64229ed

Browse files
authored
Better docstring for recurrence threshold (#161)
* remove outdated `fixedrate` keyword * more explanatory docstrings for recurrence threshold * bump version * remove references to windowed macro
1 parent b1b3f6c commit 64229ed

File tree

5 files changed

+16
-286
lines changed

5 files changed

+16
-286
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecurrenceAnalysis"
22
uuid = "639c3291-70d9-5ea2-8c5b-839eba1ee399"
33
repo = "https://github.com/JuliaDynamics/RecurrenceAnalysis.jl.git"
4-
version = "2.0.6"
4+
version = "2.0.7"
55

66
[deps]
77
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"

docs/src/quantification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ rqa
2727

2828
---
2929

30-
See also the [`@windowed`](@ref) macro for a windowed version of `rqa`.
30+
See also the [`windowed`] function for a windowed version of `rqa`.
3131

3232
## Example
3333

docs/src/rplots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ using RecurrenceAnalysis, DelayEmbeddings, CairoMakie
152152
data = sin.(2*π .* (0:400)./ 60)
153153
Y = embed(data, 3, 15)
154154
155-
R = RecurrenceMatrix(Y, 0.25; fixedrate=true)
155+
R = RecurrenceMatrix(Y, GlobalRecurrenceRate(0.25))
156156
R_skel = skeletonize(R)
157157
158158
fig = Figure(resolution = (1000,600))

src/matrices/recurrence_matrix_types.jl

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,18 @@ SparseArrays.SparseMatrixCSC(R::ARM) = SparseMatrixCSC(R.data)
8686
# Documentation strings and dispatch to `recurrence_matrix`
8787
################################################################################
8888
"""
89-
RecurrenceMatrix(x, ε; metric = Euclidean(), parallel::Bool)
89+
RecurrenceMatrix(x, rthres; metric = Euclidean(), parallel::Bool)
9090
91-
Create a recurrence matrix from trajectory `x`
92-
and with recurrence threshold specification `ε`.
91+
Create a recurrence matrix from timeseries or trajectory `x`
92+
and with recurrence threshold `rthres`.
9393
`x` is either a [`StateSpaceSet`](@ref) for multivariate data
9494
or an `AbstractVector{<:Real}` for timeseries.
9595
96-
If `ε::Real` is given, a [`RecurrenceThreshold`](@ref) is used to specify recurrences.
97-
Otherwise, any subtype of [`AbstractRecurrenceType`](@ref) may be given as `ε` instead.
96+
The variable `rthres` defines how recurrences are estimated.
97+
It can be any subtype of [`AbstractRecurrenceType`](@ref),
98+
and different types can specify recurrences differently.
99+
Alternatively, `rthres` can be a real number, which then becomes
100+
an instance of [`RecurrenceThreshold`](@ref).
98101
99102
The keyword `metric`, if given, must be any subtype of `Metric` from
100103
[Distances.jl](https://github.com/JuliaStats/Distances.jl)
@@ -166,16 +169,16 @@ end
166169

167170

168171
"""
169-
CrossRecurrenceMatrix(x, y, ε; kwargs...)
172+
CrossRecurrenceMatrix(x, y, rthres; kwargs...)
170173
171174
Create a cross recurrence matrix from trajectories `x` and `y`.
172-
See [`RecurrenceMatrix`](@ref) for possible value for `ε` and `kwargs`.
175+
See [`RecurrenceMatrix`](@ref) for possible value for `rthres` and `kwargs`.
173176
174177
The cross recurrence matrix is a bivariate extension of the recurrence matrix.
175178
For the time series `x`, `y`, of length `n` and `m`, respectively, it is a
176179
sparse `n×m` matrix of Boolean values.
177180
178-
Note that cross recurrence matrices are generally not symmetric irrespectively of `ε`.
181+
Note that cross recurrence matrices are generally not symmetric irrespectively of `rthres`.
179182
"""
180183
function CrossRecurrenceMatrix(x, y, ε;
181184
# DEPRECATED keywords. TODO: Remove them in next stable release.
@@ -203,10 +206,10 @@ function CrossRecurrenceMatrix(x, y, ε;
203206
end
204207

205208
"""
206-
JointRecurrenceMatrix(x, y, ε; kwargs...)
209+
JointRecurrenceMatrix(x, y, rthres; kwargs...)
207210
208211
Create a joint recurrence matrix from trajectories `x` and `y`.
209-
See [`RecurrenceMatrix`](@ref) for possible values for `ε` and `kwargs`.
212+
See [`RecurrenceMatrix`](@ref) for possible values for `rthres` and `kwargs`.
210213
211214
The joint recurrence matrix considers the recurrences of the trajectories
212215
of `x` and `y` separately, and looks for points where both recur

src/rqa/windowed.jl

Lines changed: 0 additions & 273 deletions
This file was deleted.

0 commit comments

Comments
 (0)