2
$\begingroup$

I'm having trouble reproducing this figure measuring mutual information as a function of the distance between symbols in text/music/genome/etc: mutual information distance from https://arxiv.org/pdf/1606.06737v2.pdf

Specifically, I'm trying to reproduce the Markov process red line by generating a Markov sequence, then calculating mutual information as a function of distance.

If I take some transition matrix:

transition matrix

And generate a sequence (e.g. array([8, 7, 7, 9, 0, 4, 2, ...)

How do I create my two distributions? For example:

dist_a = sequence[distance:]
dist_b = sequence[:-distance]

By making distributions this way, on the Shakespeare plays dataset I get a graph that looks like this: markov shakespeare

where MI Markov is generated from a Markov process, and MI random is the a random permutation of the original texts (all at the level of characters). This clearly does not fit with the above graph, so I assume there is another way of sampling these two distributions? MI here is calculated using sklearn.metrics

$\endgroup$
1
  • $\begingroup$ Love this question and the Tegmark paper referenced! One thing about the graph that strikes me is the difference in the shape of the Markov process versus the others. The former looks lognormal while the others appear much more heavy tailed. $\endgroup$
    – user78229
    Commented Oct 20, 2016 at 18:16

1 Answer 1

1
$\begingroup$

As your distances get larger, the length of dist_b decreases and you begin undersampling the joint distribution for your MI computation. This can result in biasing your mutual information estimate high.

See the corrections the authors used in Section D.

If you don't want to code up their MI estimator yourself, you might have better luck with the corrections in the pyentropy package rather than the (apparently biased) sklearn implementation.

$\endgroup$
1
  • $\begingroup$ !slightly different results using pyentropy... $\endgroup$
    – Tim
    Commented Oct 25, 2016 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.