Published July 12, 2026
| Version v0.1.0
Software
Open
circadia-bio/Rtractor: v0.1.0
Description
π Multiscale family
- Added
multiscale_entropy()β multiscale entropy (MSE; Costa, Goldberger & Peng 2002), the first function in the previously-empty multiscale family. Direct C++ port of the counting core in PhysioNet's referencemse.c(Costa), validated to reproduce the compiled reference binary's output exactly (to its own displayed precision) on synthetic test data, both at the sample-entropy level and for the full multiscale sweep. - Added
sample_entropy()β sample entropy (SampEn; Richman & Moorman 2000), filling a previously-planned gap in the entropy family and serving as the building blockmultiscale_entropy()applies at each coarse-grained scale.
π² Simulate family
- Added
pmodel()β multifractal binomial cascade generator (Meneveau & Sreenivasan 1987), with optional Fourier-domain fractional integration (Davis et al. 1997). Clean-room R reimplementation ofpmodel.m(Victor Venema). Validated against two RNG-independent structural properties: exact constant output at p=0.5, and exact mass conservation at every cascade level for any p.
π§ Ported from mrpheus
- Added
perm_entropy(),petrosian_fd(),hjorth_parameters(), andnum_zerocross()β four nonlinear/complexity features centralised from Lucas FranΓ§a's ownmrpheuspackage (its AASM staging feature pipeline, itself a validated R/C++ port of the YASA/antropy Python feature set). Re-validated directly against antropy 0.2.2 during this port: exact match forperm_entropy(normalized value),petrosian_fd, andnum_zerocross.hjorth_parametersagrees closely but not exactly by design β it uses Bessel-corrected (ddof=1) variance, matching mrpheus's/R's convention, rather than antropy's population-variance (ddof=0) convention; the difference shrinks as signal length grows. Rtractor's existinghiguchi_fd()was cross-checked against mrpheus/antropy's version and found to agree exactly for realistic epoch lengths.
πΏ Fractal family
- Added
dfa()β Detrended Fluctuation Analysis. Direct C++ port of PhysioNet's referencedfa.c(Mietus, Peng & Moody), validated to reproduce the compiled reference binary's output exactly on synthetic test data. Package license changed toGPL (>= 2)as a result (seeinst/COPYRIGHTS). - Added
higuchi_fd()β Higuchi Fractal Dimension. Clean-room C++ reimplementation from Higuchi (1988), validated against a MATLAB reference implementation on synthetic test data (max abs. difference ~1e-11). - Added
mfdma()β multifractal detrending moving average (Gu & Zhou 2010). Clean-room C++ reimplementation from the published algorithm, segment-fluctuation core validated against a Python transliteration of the reference MATLAB implementation on synthetic test data (exact match to displayed precision). - Added
chhabra_jensen()β multifractal spectrum via the Chhabra-Jensen box-counting method (1989). Clean-room C++ reimplementation, moments core validated against a Python transliteration of the reference implementation (exact match to displayed precision).
π RQA family
- Added
recurrence_microstate_entropy()β recurrence microstates maximum-entropy threshold search (Corso et al. 2018; Prado et al. 2018). Direct C++ port of the deterministic core ofMax_Entropy()fromcircadia-bio/maxEntropy(Entropy.jl, MIT licensed), the script used in Ferre et al. (2024, PLOS ONE). Random pair sampling moved to R for set.seed()-reproducibility; core loop validated against a Python transliteration of the original (exact match on synthetic test data).
π Initial scaffold
- Repository initialised: package skeleton (
DESCRIPTION,.Rprofile,R/,src/,tests/testthat/) with no exported functions yet. - Added Rtractor colour palette (
rtractor_palette(),rtractor_palettes()), discrete/continuous ggplot2 scales (scale_colour_rtractor(),scale_fill_rtractor(),scale_colour_rtractor_c(),scale_fill_rtractor_c()), andtheme_rtractor(). - Planned function families stubbed as file headers only (no
implementations yet, pending reference code inventory):
entropy,fractal,lyapunov,multiscale,rqa,embed.
π¨ Visual identity
- Hex sticker logo (
man/figures/logo.svg), matching the Circadia Lab ecosystem's visual conventions: a dense woven strange-attractor motif (a nod to "Rtractor" = R + attractor) on a dotted-paper background, with the Rtractor colour palette carried through the border and wordmark. Wordmark baked as vector outlines rather than live text, so it renders correctly regardless of font availability in whatever tool processes the SVG (favicon generators, etc.). - pkgdown site live at https://rtractor.circadia-lab.uk, with the full
favicon set generated via
pkgdown::build_favicons().
π Documentation
vignette("getting-started")β tour of every implemented family.vignette("multifractal-methods")βmfdma()vschhabra_jensen(), validated against knownpmodel()ground truth rather than just checking both run without error.vignette("entropy-and-complexity")βperm_entropy()/sample_entropy()/multiscale_entropy(), including the classic Costa et al. white-noise-vs-correlated-signal multiscale entropy demonstration.
Files
circadia-bio/Rtractor-v0.1.0.zip
Files
(400.0 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:8aa3477153230cade3e4f11bbd137d42
|
400.0 kB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/circadia-bio/Rtractor/tree/v0.1.0 (URL)
Software
- Repository URL
- https://github.com/circadia-bio/Rtractor