JuliaDynamics / Associations.jl

Algorithms for quantifying associations, independence testing and causal inference from data.
https://juliadynamics.github.io/Associations.jl/stable/
Other
147 stars 12 forks source link

Implement Compression-Complexity Causality (CCC) algorithm #161

Open AditiKathpalia opened 2 years ago

AditiKathpalia commented 2 years ago

This is a causal inference technique for time series that employs complexity estimators based on lossless data compression algorithms. Relevant publications: https://peerj.com/articles/cs-196/ https://arxiv.org/abs/2204.11731 MATLAB implementations: CCC for bivariate causality: https://peerj.com/articles/cs-196/#supplemental-information Permutation CCC or CCC for multidimensional systems: https://github.com/AditiKathpalia/PermutationCCC Python implementation: https://github.com/pranaysy/ETCPy

Datseris commented 2 years ago

thanks for sharing code!

Datseris commented 1 year ago

And an extension to this is: Compression complexity with ordinal patterns for robust causal inference in irregularly sampled time series from https://www.nature.com/articles/s41598-022-18288-4 with abstract:

Distinguishing cause from effect is a scientific challenge resisting solutions from mathematics, statistics, information theory and computer science. Compression-Complexity Causality (CCC) is a recently proposed interventional measure of causality, inspired by Wiener–Granger’s idea. It estimates causality based on change in dynamical compression-complexity (or compressibility) of the effect variable, given the cause variable. CCC works with minimal assumptions on given data and is robust to irregular-sampling, missing-data and finite-length effects. However, it only works for one-dimensional time series. We propose an ordinal pattern symbolization scheme to encode multidimensional patterns into one-dimensional symbolic sequences, and thus introduce the Permutation CCC (PCCC). We demonstrate that PCCC retains all advantages of the original CCC and can be applied to data from multidimensional systems with potentially unobserved variables which can be reconstructed using the embedding theorem. PCCC is tested on numerical simulations and applied to paleoclimate data characterized by irregular and uncertain sampling and limited numbers of samples.