No description
- Haskell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| app | ||
| .gitignore | ||
| Definitions.hs | ||
| LICENSE | ||
| README.md | ||
| tight-bound.cabal | ||
natlat-bound-tightness
Haskell code for checking how tight the "Mediator Determines Redund" bound from natural latents is:
H(Z_red | Z_med) <= TC(X_1, ..., X_n | Z_med) + 2 * max_i H(Z_red | X_i)
where TC(X | Z_med) is the conditional total correlation (the mediation
error) and max_i H(Z_red | X_i) is the redundancy error. The tightness of
a distribution is the left side divided by the right side (taken as 1 when
the right side is 0); all entropies are in nats.
| File | What |
|---|---|
Definitions.hs |
Entropy, marginals, conditional entropy, redundancy error, conditional total correlation, tightness, over finite joint distributions |
app/exactTightness.hs |
exact-tightness: an example where the bound holds with equality (X_1 a fair coin, X_2 = X_1 XOR a biased coin, Z_red = (X_1, X_2), Z_med constant), so it cannot be improved |
app/tightnessSweep.hs |
tightness-sweep: a grid sweep over distributions where three binned observables and both latents are deterministic functions of a temperature; prints CSV with the errors, bound and tightness of each |
Build and run
Needs GHC and cabal.
cabal run exact-tightness
cabal run tightness-sweep > sweep.csv
License
MIT. See LICENSE.