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.
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.