Skip to content

Latest commit

 

History

History
113 lines (99 loc) · 6.41 KB

CHANGELOG.md

File metadata and controls

113 lines (99 loc) · 6.41 KB

Changelog

Unreleased

  • Docs: README rewritten with a banner, runnable examples that show their real outputs, a "Why trust the numbers" validation table, a guide to choosing a measure, and an "Honest limits" section. The quickstart examples in the README and on the docs site crashed (window=20 on an 8-point series); they now run, and tests/test_readme.py executes every example and checks the numbers it claims.

  • CI: removed the tag-triggered PyPI publish workflow (publish.yml). Releases are uploaded to PyPI manually; see "Releasing" in CONTRIBUTING.md.

0.3.1 — 2026-09-21

  • Fixed (changes results): missing and infinite values no longer produce plausible-looking numbers. Previously one NaN made permutation.compute return a finite value, spectral.compute return -0.0, sample.compute return a large finite value, and shannon.compute raise. Now every measure (compute, normalized, multiscale, transfer, divergence.kl/js) returns NaN when its input holds NaN or ±inf, and rolling/delta are NaN for exactly the windows that contain one. Reported while building the training early-warning study.
  • Fixed: zero entropy is returned as 0.0, never -0.0 (constant or perfectly ordered input, a single region in shannon.geographic).
  • CI: move the remaining GitHub Actions off the deprecated Node 20 runtime (upload-artifact and download-artifact to v7, upload-pages-artifact and deploy-pages to v5).

0.3.0 — 2026-09-13

  • Validated against independent implementations. Sample, approximate, permutation, spectral and multiscale entropy now match antropy and/or EntropyHub exactly (relative error < 1e-10) on four signal types; Shannon and normal differential entropy match scipy. See docs/validation.md. The checks live in tests/test_reference.py and run in a dedicated CI job.
  • Fixed (changes results): sample entropy counts length-m matches over the same N - m templates as length-m+1 matches (Richman & Moorman 2000). Values shift by roughly 0.001 to 0.003.
  • Fixed (changes results): multiscale entropy fixes the tolerance from the original series instead of recomputing it per scale (Costa et al. 2002). The old behaviour made white noise look more complex at coarser scales. multiscale.compute gains m and r arguments.
  • Faster transfer entropy: KSG neighbour counting is vectorized with a single k-d tree query, about 250x faster on 20,000 points (identical results).
  • polars support: every measure accepts a polars Series; rolling and delta return a polars Series with the input's name.
  • scikit-learn integration: entroscope.features.EntropyFeatures, a pipeline-ready transformer that turns time-series windows into entropy features.
  • New optional extras: sklearn, polars, reference, docs.
  • Docs site (MkDocs Material) with validation and integrations pages.
  • README: corrected the quick-start value (shannon.compute returns 1.75, not 0.73), listed all nine measures, and fixed the PyPI Homepage and docs links.
  • CI: ruff pinned so new ruff releases can't break the build; checkout and setup-python bumped off the deprecated Node 20 runtime.

0.2.0 — 2026-06-03

  • Transfer entropy (entroscope.transfer) — the first bivariate measure: directional information flow TE(X→Y) (Schreiber 2000) with two estimators, Kraskov KSG k-NN (default, no binning) and a binned histogram cross-check. API: compute, rolling, delta, plot. A sample-size guard warns when the data is too thin for the embedding dimension. Correctness is validated against three independent authorities: the bivariate-Gaussian closed form, the Kraskov-2004 analytic mutual information, and a hand-checked isolated embedding.
  • Divergence (entroscope.divergence) — distribution-vs-distribution measures: kl (Kullback-Leibler, directional) and js (Jensen-Shannon, symmetric, bounded [0, 1] bits), plus plot. Inputs are two raw samples, binned over a shared range; KL uses epsilon smoothing to stay finite on empty bins. Useful for data-drift detection (training vs production distributions).
  • Fixed: importing a measure no longer forces matplotlib's Agg backend (issue #2). The library no longer mutates global matplotlib state on import, so interactive plotting (e.g. df.plot() in a notebook) keeps working. Headless, Docker, and CI users who want a guaranteed non-interactive backend should set MPLBACKEND=Agg in their environment.
  • Correlation-stability example (examples/correlation_stability.py) — entropy of a rolling correlation series as a regime-stability gauge, shipped alongside a rolling-std baseline so the comparison stays honest.
  • New worked examples: examples/information_flow.py (directional transfer entropy) and examples/drift.py (KL/JS distribution drift).

0.1.1 — 2026-06-01

  • Added a LICENSE file (MIT) and a CONTRIBUTING.md guide.
  • Rewrote the README: clearer intro, working PyPI/CI/Python/license badges, and links to the example write-ups.
  • Added PyPI trove classifiers (supported Python versions, license, topics) so the Python-versions badge and PyPI sidebar populate correctly.
  • Runnable example scripts in examples/: four medical/biomedical scenarios (HRV/sample, EEG/permutation+spectral, respiration/approximate, glucose/differential) and four business scenarios (sales/shannon, web-traffic/spectral, prices/permutation, QC/multiscale), plus matching docs/examples/medical.md and docs/examples/business.md pages.
  • Smoke tests (tests/test_examples.py) run the example scripts in CI so they can't silently break; CI lint now covers examples/ too.
  • CI/CD via GitHub Actions: lint (ruff check + format), test matrix across Python 3.9 to 3.14 with a 90% coverage gate, and a build + twine check job.
  • Tag-triggered PyPI publish workflow using trusted publishing (inert until a PyPI publisher is configured).
  • Applied ruff format across the codebase; added ruff to the dev extra.

0.1.0 — 2026-06-01

Initial release.

  • Seven entropy measures: shannon, permutation, sample, approximate, spectral, differential, multiscale.
  • Consistent API across measures: compute, rolling, delta, plot, plus normalized (shannon/permutation/spectral) and geographic (shannon).
  • Works on pd.Series (index preserved) and np.ndarray.
  • Visualization helpers: plot.compare, plot.dashboard, plot.drop_events.