Skip to content

Add divergence module (KL + Jensen-Shannon) for distribution comparison - #3

Merged
Par-python merged 6 commits into
masterfrom
feat/divergence
Jun 3, 2026
Merged

Add divergence module (KL + Jensen-Shannon) for distribution comparison#3
Par-python merged 6 commits into
masterfrom
feat/divergence

Conversation

@Par-python

Copy link
Copy Markdown
Owner

Adds entroscope.divergence — distribution-vs-distribution measures, the
deferred sibling of the transfer-entropy work. Answers the data-drift use case:
compare two batches of values (training vs production, period A vs B) and
quantify how far apart their distributions are.

API

divergence.kl(p, q, bins=10)   # Kullback-Leibler, directional, bits
divergence.js(p, q, bins=10)   # Jensen-Shannon, symmetric, bounded [0,1] bits
divergence.plot(p, q, bins=10) # overlay the two binned distributions

@Par-python
Par-python merged commit fd1268d into master Jun 3, 2026
8 checks passed
@Par-python Par-python mentioned this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant