@@ -200,8 +200,7 @@ nmprt(x::ARM; kwargs) = maximum(verticalhistograms(x; kwargs...)[2])
200200 rqa(x; kwargs...)
201201
202202Calculate all RQA parameters of a recurrence matrix. See the functions
203- `recurrencerate`, `determinism`, `dl_average`, `dl_max`, `divergence`, `dl_entropy`,
204- `trend`, `laminarity`, `trappingtime` and `vl_max` for the definition of
203+ referred to below for the definition of
205204the different parameters and the default values of the arguments.
206205Using this function is much more efficient than calling all individual functions
207206one by one.
@@ -214,16 +213,19 @@ structures.
214213
215214The returned value is a dictionary with the following keys:
216215
217- * "RR": recurrence rate (see `recurrencerate`)
218- * "DET": determinsm (see `determinism`)
219- * "L": average length of diagonal structures (see `dl_average`)
220- * "Lmax": maximum length of diagonal structures (see `dl_max`)
221- * "DIV": divergence (see `divergence`)
222- * "ENTR": entropy of diagonal structures (see `dl_entropy`)
223- * "TREND": trend of recurrences (see `trend`)
224- * "LAM": laminarity (see `laminarity`)
225- * "TT": trapping time (see `trappingtime`)
226- * "Vmax": maximum length of vertical structures (`see `vl_max`)
216+ * "RR": recurrence rate (see [`recurrencerate`](@ref))
217+ * "DET": determinsm (see [`determinism`](@ref))
218+ * "L": average length of diagonal structures (see [`dl_average`](@ref))
219+ * "Lmax": maximum length of diagonal structures (see [`dl_max`](@ref))
220+ * "DIV": divergence (see [`divergence`](@ref))
221+ * "ENTR": entropy of diagonal structures (see [`dl_entropy`](@ref))
222+ * "TREND": trend of recurrences (see [`trend`](@ref))
223+ * "LAM": laminarity (see [`laminarity`](@ref))
224+ * "TT": trapping time (see [`trappingtime`](@ref))
225+ * "Vmax": maximum length of vertical structures (see [`vl_max`](@ref))
226+ * "MRT": mean recurrence time (see [`meanrecurrencetime`](@ref))
227+ * "RTE" recurrence time entropy (see [`rt_entropy`](@ref))
228+ * "NMPRT": number of the most probable recurrence time (see [`nmprt`](@ref))
227229
228230The keyword argument `onlydiagonal` (`false` by default) can be set to `true`
229231in order to restrict the analysis to the recurrence rate and the parameters related
@@ -248,18 +250,21 @@ function rqa(x; onlydiagonal=false, kwargs...)
248250 kw_v = Dict (kwargs)
249251 haskey (kw_v, :theilervert ) && (kw_v[:theiler ] = kw_v[:theilervert ])
250252 haskey (kw_v, :lminvert ) && (kw_v[:lmin ] = kw_v[:lminvert ])
251- vhist = verticalhistograms (x; kw_v... )[ 1 ]
253+ vhist, rthist = verticalhistograms (x; kw_v... )
252254 rr_v = recurrencerate (x; kw_v... )
253255 return Dict (" RR" => recurrencerate (x; kwargs... ),
254256 " DET" => _determinism (dhist, rr_d* length (x)),
255257 " L" => _dl_average (dhist),
256258 " Lmax" => _dl_max (dhist),
257259 " DIV" => 1.0 / _dl_max (dhist),
258260 " ENTR" => _dl_entropy (dhist),
259- " TREND" => trend (x; kw_d... ),
261+ " TREND" => trend (x; kw_d... ),
260262 " LAM" => _laminarity (vhist, rr_v* length (x)),
261263 " TT" => _vl_average (vhist),
262- " Vmax" => _vl_max (vhist)
264+ " Vmax" => _vl_max (vhist),
265+ " MRT" => _rt_average (rthist),
266+ " RTE" => _rt_entropy (rthist),
267+ " NMPRT" => maximum (rthist)
263268 )
264269 end
265270end
0 commit comments