transfer_entropy#
- infomeasure.transfer_entropy(*data, approach: str, **kwargs: any)[source]#
Calculate the transfer entropy using a functional interface of different estimators.
Supports the following approaches:
bonachela:Bonachela transfer entropy estimator.chao_shen:Chao-Shen transfer entropy estimator.chao_wang_jost:Chao Wang Jost transfer entropy estimator.discrete:Discrete transfer entropy estimator.grassberger:Grassberger transfer entropy estimator.[
metric,ksg]:Kraskov-Stoegbauer-Grassberger transfer entropy estimator.[
miller_madow,mm]:Miller-Madow transfer entropy estimator.nsb:NSB (Nemenman-Shafee-Bialek) transfer entropy estimator.[
ordinal,symbolic,permutation]:Ordinal transfer entropy estimator.tsallis:Tsallis transfer entropy estimator.
- Parameters:
- source, destarray_like
The source (X) and destination (Y) data used to estimate the transfer entropy.
- condarray_like,
optional The conditional data used to estimate the conditional transfer entropy.
- approach
str The name of the estimator to use.
- step_size
int Step size between elements for the state space reconstruction.
- src_hist_len, dest_hist_len
int Number of past observations to consider for the source and destination data.
- prop_time
int,optional Number of positions to shift the data arrays relative to each other. Delay/lag/shift between the variables. Default is no shift. Assumed time taken by info to transfer from source to destination. Not compatible with the
condparameter / conditional TE. Alternatively calledoffset.- *args: tuple
Additional arguments to pass to the estimator.
- **kwargs: dict
Additional keyword arguments to pass to the estimator.
- Returns:
floatThe calculated transfer entropy.
- Raises:
ValueErrorIf the estimator is not recognised.