PLEROS / SCIENTIFIC COMPUTING
Lempel–Ziv
sequence analysis.
Measure randomness, correlations across scales and similarity in symbolic data.
lzcomplexity brings entropy density, effective measure complexity and information distance to Python, Rust and standalone command-line tools.
pip install lzcomplexityOpen source · MIT licensed · Python + Rust
THE MEASURES
Randomness, structure and similarity.
Use h to study the production of new information, E to examine organization across ranges, and d to compare sequences.
Learn to interpret the resultsHow random is it?
Captures how much new information a sequence produces: its unpredictability and freedom to vary. In language and creative processes, this can reflect innovation within a context.
How structured it is?
Sensitive to correlations across different ranges and levels of organization. In text, think of the context carried by letters, words and longer passages.
How different are they?
Derived from Normalized Information Distance (NID), d compares the patterns shared by two sequences. Use it to compare recordings, texts or symbolic trajectories.
INTERACTIVE PLAYGROUND
Explore your own sequences.
Paste a sequence, choose an example and explore what changes.
Start with banana to see the factor boundaries, or try a longer example to explore E.
Ready to analyze your new sequence.
The final copied tail is excluded from the reported count. Short-sequence estimates of h can exceed one.
The scale profile shows the fitted score as the examined range increases.
A lower d indicates more shared patterns. Compare sequences with the same encoding and similar lengths.
UTF-8 byte analysis · automatic logarithm base 3 · Python cheatsheet ↗
PYTHON, RUST AND THE COMMAND LINE
Analyze a sequence.
Compare a collection.
Factor a sequence, estimate its entropy density, explore effective measure complexity and compare it with another sequence. One Rust core powers all three interfaces.
import lzcomplexity as lz
sequence = "00010111" * 256
result = lz.lz76(
sequence,
log_base=2,
max_block_size=16,
)
print(result["h"])
print(result["emc"]["value"])
print(lz.nid(sequence, "01010101" * 256))FROM SYMBOLS TO SCIENCE
Research applications.
Use symbolic representations to study information in experimental signals, biological sequences and nonlinear dynamics.
Neural time series
Choose a threshold, build a binary sequence and compare matched windows.
Read the recipe ↗Genomic sequences
Read FASTA, handle ambiguous bases and make encoding choices explicit.
Read the recipe ↗Dynamical systems
Symbolize a trajectory and examine its transition from regular to chaotic behavior.
Read the recipe ↗