polsys / ennemi

Easy Nearest Neighbor Estimation of Mutual Information
https://polsys.github.io/ennemi/
MIT License
35 stars 12 forks source link

Multidimensional conditional MI #5

Closed polsys closed 4 years ago

polsys commented 4 years ago

This allows conditioning on several variables simultaneously. The n-dimensional grid data structure could also be used for multivariate MI later.

This regresses one-dimensional conditional MI performance: on my laptop, the run time is increased by 50%. I think this is acceptable given the benefits of multivariable conditioning. The univariate case has some special handling of the z projection: a 1D array with faster _count_within is used instead of the grid. Unconditional MI performance actually improved slightly, as I created a separate copy of the methods for the 2D case.