jakobrunge/tigramite

Implementation of the CMI estimation for CMIKnn

j-bl opened this issue · 1 comments

j-bl commented

Hi everyone,

I was reading the the documentation of the cmi estimation for the CMIKnn(_get_dependency_measure(...) in https://github.com/jakobrunge/tigramite/blob/master/tigramite/independence_tests/cmiknn.py). Here, the docstring explains that the nearest neighbor estimate is calculated according to a paper published by Frenzel and Pompe:

Returns CMI estimate as described in Frenzel and Pompe PRL (2007).

If I understand the code correctly, _get_nearest_neighbors(...) defines the neighborhoods $k_{xz}$, $k_{yz}$, $k_z$ and includes the reference points in these neighborhoods. This fits with the definition of the CMIKnn paper:

Count the number of points with distance strictly smaller than $\epsilon_i$ (including the reference point at $i$)

However, Frenzel and Pompe specifically define the neighborhoods with $t^* \neq t$. In my opinion, this implicates that the docstring is incorrect / misleading.

That should be correctly described in the updated master.