Skip to content

PySDKit 0.4.56

Choose a tag to compare

@wwhenxuan wwhenxuan released this 28 Aug 17:39
· 3 commits to main since this release

Highlights

This release grows entropy of modes, adds underdetermined blind source separation, and ships the Read the Docs site that the gallery and API now live on.

  • Entropy (pysdkit.entropy) — approximate, fuzzy, dispersion, spectral, distribution, increment, slope, and symbolic-dynamic entropy, plus Costa / composite / refined-composite multiscale variants of the measures that support them. Use them as scalar complexity features on a raw record or on each IMF after EMD / VMD.
  • BSS (pysdkit.utils.bss) — Yu's frequency-energy clustering of the STFT (Shock and Vibration 2019; MATLAB pack originally named YGBSS). Underdetermined mixtures with delay are separated by binary frequency masks and inverse STFT; not EMD-style sifting.
  • Documentation — Sphinx + pydata-sphinx-theme on pysdkit.readthedocs.io. Gallery scripts are Python (no notebooks in examples/), figures are cached for Read the Docs, and the navbar can switch latest / stable / 0.4.56.

Also on PyPI as 0.4.56: pip install -U PySDKit.

What's new

  • Entropy (pysdkit.entropy)
    • approximate_entropy, fuzzy_entropy (+ multiscale_fuzzy_entropy)
    • dispersion_entropy (+ multiscale_dispersion_entropy)
    • spectral_entropy, distribution_entropy, increment_entropy, slope_entropy, symbolic_dynamic_entropy
    • composite_multiscale_sample_entropy, refined_composite_multiscale_sample_entropy
    • Existing permutation / sample entropy kept; shared coarse-graining helpers in _coarse_grain.py
    • Tests: pysdkit/tests/test_entropy.py
    • Gallery: examples/utils/entropy.py
  • Blind source separation (pysdkit.utils.bss)
  • Docs site
    • User guide, API pages per family, About (cite / maintainers / license), Release notes from GitHub Releases
    • Sphinx-Gallery from examples/**/*.py; CONTRIBUTING.md for adding an algorithm
  • Removed
    • pysdkit.models (KNN / PCA stubs). pysdkit.data.test_pca is unchanged.

Quick start

from pysdkit import VMD
from pysdkit.data import test_vmd
from pysdkit.entropy import spectral_entropy, sample_entropy
from pysdkit.utils import BSS

t, x, fs = test_vmd()
imfs = VMD(alpha=2000, K=4, tau=0.0, tol=1e-7).fit_transform(x)
print(spectral_entropy(imfs[0]), sample_entropy(imfs[0], m=2, r=0.2))

# Underdetermined BSS: mix, cluster frequency energy, recover sources
# y = BSS(num=2).fit_transform(mixture)  # see examples/utils/bss.py

Notes

  • Import entropy as from pysdkit.entropy import … (not top-level pysdkit).
  • Compare entropy values within one measure; SpecEn is scaled to [0, 1], IncrEn is in nats.
  • BSS is a separator, not a decomposer: it returns recovered sources, not IMFs.
  • Docs: latest tracks main; this tag is 0.4.56 once that version is built on Read the Docs.

Install

pip install -U PySDKit

Full Changelog: 0.4.55...0.4.56