12 complexity features — same math as antropy — plus a coupling diagnosis that tells you what the numbers mean. One function. Plain English.
pip install begump
from gump.entropy import profile, diagnose, compare
# Full profile — 12 features + K/R/E/T + diagnosis
result = profile(signal, fs=256)
print(result['diagnosis']) # "decoupling"
print(result['K']) # 0.0114
print(result['features']) # all 12 raw features
# Quick — one word
state = diagnose(signal, fs=256)
# "decoupled" / "coupled" / "grokking" / "phase-locked"
# Compare two signals
diff = compare(before, after, fs=256)
print(diff['comparison'])
print(diff['delta_K']) # +0.4 = gaining structure
Permutation entropy, spectral entropy, SVD entropy, approximate entropy, sample entropy, Hjorth mobility, Hjorth complexity, Petrosian FD, Katz FD, Higuchi FD, DFA, Lempel-Ziv complexity. Same algorithms, same papers, same math. We just added K on top.
K is derived from spectral entropy (how peaked vs flat the spectrum is). R from DFA alpha (how ordered across time). T from distance to the optimal coupling point (1/φ × K ceiling). The diagnosis maps these to plain English: is this signal healthy, breaking, locked, or searching?