KernelMIEstimator#
- class infomeasure.estimators.mutual_information.KernelMIEstimator(*data, cond=None, bandwidth: float | int = None, kernel: str = None, offset: int = 0, workers: int = 1, normalize: bool = False, base: int | float | str = 'e', **kwargs)[source]
Bases:
BaseKernelMIEstimator,MutualInformationEstimatorEstimator for mutual information using Kernel Density Estimation (KDE).
\[I(X;Y) = \sum_{i=1}^{n} p(x_i, y_i) \log \left( \frac{p(x_i, y_i)}{p(x_i)p(y_i)} \right)\]- Attributes:
- *dataarray_like,
shape(n_samples,) The data used to estimate the mutual information. You can pass an arbitrary number of data arrays as positional arguments.
- bandwidth
float|int The bandwidth for the kernel.
- kernel
str Type of kernel to use, compatible with the KDE implementation
kde_probability_density_function().- offset
int,optional Number of positions to shift the data arrays relative to each other. Delay/lag/shift between the variables. Default is no shift.
- normalizebool,
optional If True, normalize the data before analysis.
- *dataarray_like,
Notes
A small
bandwidthcan lead to under-sampling, while a largebandwidthmay over-smooth the data, obscuring details.