KSGCMIEstimator#
- class infomeasure.estimators.mutual_information.KSGCMIEstimator(*data, cond=None, k: int = 4, ksg_id: int = 1, noise_level=1e-10, minkowski_p=inf, offset: int = 0, normalize: bool = False, base: int | float | str = 'e', **kwargs)[source]
Bases:
BaseKSGMIEstimator,ConditionalMutualInformationEstimatorEstimator for conditional mutual information using the Kraskov-Stoegbauer-Grassberger (KSG) method.
- Attributes:
- *dataarray_like,
shape(n_samples,) The data used to estimate the conditional mutual information. You can pass an arbitrary number of data arrays as positional arguments.
- condarray_like
The conditional data used to estimate the conditional mutual information.
- k
int The number of nearest neighbors to consider.
- noise_level
float The standard deviation of the Gaussian noise to add to the data to avoid issues with zero distances.
- minkowski_p
float, \(1 \leq p \leq \infty\) The power parameter for the Minkowski metric. Default is np.inf for maximum norm. Use 2 for Euclidean distance.
- normalizebool,
optional If True, normalize the data before analysis.
- *dataarray_like,
Notes
Changing the number of nearest neighbors
kcan change the outcome, but the default value of \(k=4\) is recommended by [KSG11].