Repository navigation
Add symbolic (partition-based) entropy, MI and CMI estimators (#59) - #60
Open
ParitKansal wants to merge 3 commits into
Open
ParitKansal wants to merge 3 commits into
ParitKansal wants to merge 3 commits into
Conversation
…-For-Complex-Systems-Science#59) Implements the symbolic estimators of Cafaro, Lord, Sun and Bollt (Chaos, 2015): symbolize, symbolic_entropy, symbolic_mutual_information and symbolic_conditional_mutual_information, available as method='symbolic' in conditional_mutual_information and information='symbolic' in discover_network. Adds 24 tests, README and CHANGELOG entries.
… clarify median wording
With partition='precomputed', NaN or inf input raised the misleading 'requires integer-valued symbols' error. The finite check now runs first, so every partition type gives the same error. The test now checks the message.
ParitKansal
force-pushed
the
symbolic-cmi-estimator
branch
from
October 23, 2026 05:39
4b9ccb0 to
9d8bf54
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #59.
Adds symbolic (partition-based) estimators following Cafaro, Lord, Sun & Bollt, "Causation entropy from symbolic representations of dynamical systems", Chaos 25, 043106 (2015), arXiv:1507.07262.
What is added
symbolize(entropy.py): partitions each variable inton_symbolscells (Eq. 2–3 of the paper). Options:quantile(equal-frequency; edges placed between distinct values so tied values always share a cell),uniform(equal-width),precomputed(data already symbolic).symbolic_entropy,symbolic_mutual_information,symbolic_conditional_mutual_information: plug-in estimators (Eq. 13–15), in nats like the other estimators.method="symbolic"inconditional_mutual_information(new explicit argsn_symbols,partition; no**kwargs).information="symbolic"indiscover_network(uses the default 2-symbol median split).Tests (24 new,
tests/core/information/test_symbolic.py)discover_network(information="symbolic")recovers exactly the true edge X0→X1 at lag 1.Cross-checks against other libraries (random cases, differences at rounding level)
mutual_info_score, pyitlibCMIsymbKBinsDiscretizerOpen questions for maintainers
discover_networkexposen_symbols/partition? That would mean threading two explicit parameters through the internal functions, so I left the default (2 symbols) for now.