tigramite


Nametigramite JSON
Version 5.2.5.1 PyPI version JSON
download
home_pagehttps://github.com/jakobrunge/tigramite/
SummaryTigramite causal inference for time series
upload_time2024-02-29 14:42:43
maintainer
docs_urlNone
authorJakob Runge
requires_python
licenseGNU General Public License v3.0
keywords causal inference causal discovery prediction time series
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # Tigramite – Causal inference for time series datasets
![logo](docs/_images/tigramite_logo_header.png)
Version 5.2
(Python Package)

[Github](https://github.com/jakobrunge/tigramite.git)

[Documentation](https://jakobrunge.github.io/tigramite/)

[Tutorials](https://github.com/jakobrunge/tigramite/tree/master/tutorials/)

## Overview

It's best to start with our [Overview/review paper: Causal inference for time series](https://github.com/jakobrunge/tigramite/blob/master/tutorials/Runge_Causal_Inference_for_Time_Series_NREE.pdf)

__Update:__ Tigramite now has a new CausalEffects class that allows to estimate (conditional) causal effects and mediation based on assuming a causal graph. Have a look at the tutorial.

Further, Tigramite provides several causal discovery methods that can be used under different sets of assumptions. An application always consists of a method and a chosen conditional independence test, e.g. PCMCIplus together with ParCorr. The following two tables give an overview of the assumptions involved:

| Method | Assumptions         | Output |
| :-- | :-- | :-- |
|         |   (in addition to Causal Markov Condition and Faithfulness)   |    |
| PCMCI  | Causal stationarity, no contemporaneous causal links, no hidden variables |  Directed lagged links, undirected contemporaneous links (for tau_min=0)  |
| PCMCIplus | Causal stationarity, no hidden variables    | Directed lagged links, directed and undirected contemp. links (Time series CPDAG) |
| LPCMCI | Causal stationarity    | Time series PAG |
| RPCMCI  | No contemporaneous causal links, no hidden variables |  Regime-variable and causal graphs for each regime with directed lagged links, undirected contemporaneous links (for tau_min=0)  |
| J-PCMCI+ | Multiple datasets, causal stationarity, no hidden system confounding, except if context-related   | Directed lagged links, directed and undirected contemp. links (Joint time series CPDAG) |


| Conditional independence test | Assumptions                                                                                            |
| :-- | :-- | 
| ParCorr                       | univariate, continuous variables with linear dependencies and Gaussian noise                           |
| RobustParCorr                 | univariate, continuous variables with linear dependencies, robust for different marginal distributions |
| ParCorrWLS                    | univariate, continuous variables with linear dependencies, can account for heteroskedastic data        |
| GPDC / GPDCtorch              | univariate, continuous variables with additive dependencies                                            |
| CMIknn                        | multivariate, continuous variables with more general dependencies (permutation-based test)             |
| Gsquared                      | univariate discrete/categorical variables                                                              |
| CMIsymb                       | multivariate discrete/categorical variables (permutation-based test)                                   |
| RegressionCI                  | mixed datasets with univariate discrete/categorical and (linear) continuous variables                  |


## General Notes

Tigramite is a causal inference for time series python package. It allows to efficiently estimate causal graphs from high-dimensional time series datasets (causal discovery) and to use graphs for robust forecasting and the estimation and prediction of direct, total, and mediated effects. Causal discovery is based on linear as well as non-parametric conditional independence tests applicable to discrete or continuously-valued time series. Also includes functions for high-quality plots of the results. Please cite the following papers depending on which method you use:

- Overview: Runge, J., Gerhardus, A., Varando, G. et al. Causal inference for time series. Nat Rev Earth Environ (2023). https://doi.org/10.1038/s43017-023-00431-y

- PCMCI: J. Runge, P. Nowack, M. Kretschmer, S. Flaxman, D. Sejdinovic, Detecting and quantifying causal associations in large nonlinear time series datasets. Sci. Adv. 5, eaau4996 (2019). https://advances.sciencemag.org/content/5/11/eaau4996
- PCMCI+: J. Runge (2020): Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets. Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence, UAI 2020,Toronto, Canada, 2019, AUAI Press, 2020. http://auai.org/uai2020/proceedings/579_main_paper.pdf
- LPCMCI: Gerhardus, A. & Runge, J. High-recall causal discovery for autocorrelated time series with latent confounders Advances in Neural Information Processing Systems, 2020, 33. https://proceedings.neurips.cc/paper/2020/hash/94e70705efae423efda1088614128d0b-Abstract.html
- RPCMCI: Elena Saggioro, Jana de Wiljes, Marlene Kretschmer, Jakob Runge; Reconstructing regime-dependent causal relationships from observational time series. Chaos 1 November 2020; 30 (11): 113115. https://doi.org/10.1063/5.0020538
- Generally: J. Runge (2018): Causal Network Reconstruction from Time Series: From Theoretical Assumptions to Practical Estimation. Chaos: An Interdisciplinary Journal of Nonlinear Science 28 (7): 075310. https://aip.scitation.org/doi/10.1063/1.5025050
- Nature Communications Perspective paper: https://www.nature.com/articles/s41467-019-10105-3
- Mediation class: J. Runge et al. (2015): Identifying causal gateways and mediators in complex spatio-temporal systems. Nature Communications, 6, 8502. http://doi.org/10.1038/ncomms9502
- Mediation class: J. Runge (2015): Quantifying information transfer and mediation along causal pathways in complex systems. Phys. Rev. E, 92(6), 62829. http://doi.org/10.1103/PhysRevE.92.062829
- CMIknn: J. Runge (2018): Conditional Independence Testing Based on a Nearest-Neighbor Estimator of Conditional Mutual Information. In Proceedings of the 21st International Conference on Artificial Intelligence and Statistics. http://proceedings.mlr.press/v84/runge18a.html
- CausalEffects: J. Runge, Necessary and sufficient graphical conditions for optimal adjustment sets in causal graphical models with hidden variables, Advances in Neural Information Processing Systems, 2021, 34. https://proceedings.neurips.cc/paper/2021/hash/8485ae387a981d783f8764e508151cd9-Abstract.html

## Features

- flexible conditional independence test statistics adapted to
  continuously-valued, discrete and mixed data, and different assumptions about
  linear or nonlinear dependencies
- handling of missing values and masks
- p-value correction and (bootstrap) confidence interval estimation
- causal effect class to  non-parametrically estimate (conditional) causal effects and also linear mediated causal effects
- prediction class based on sklearn models including causal feature selection

## Required python packages

- python=3.7/3.8/3.9/3.10
- numpy <1.24,>=1.18
- scipy>=1.10.0
- numba==0.56.4

## Optional packages depending on used functions
- scikit-learn>=1.2   # Gaussian Process (GP) Regression
- matplotlib>=3.7.0   # Plotting
- seaborn>=0.12.2     # Plotting
- networkx>=3.0       # Plotting
- torch>=1.13.1       # GPDC pytorch version (in conda install pytorch)
- gpytorch>=1.9.1     # GPDC gpytorch version
- dcor>=0.6           # GPDC distance correlation version
- joblib>=1.2.0       # CMIsymb shuffle parallelization
- ortools>=9.2        # RPCMCI

## Installation

python setup.py install

This will install tigramite in your path.

To use just the ParCorr, CMIknn, and CMIsymb independence tests, only numpy/numba and scipy are required. For other independence tests more packages are required:

- GPDC: scikit-learn is required for Gaussian Process regression and dcor for distance correlation

- GPDCtorch: gpytorch is required for Gaussian Process regression

Note: Due to incompatibility issues between numba and numpy, we currently enforce soft dependencies on the versions.

## User Agreement

By downloading TIGRAMITE you agree with the following points: TIGRAMITE is provided without any warranty or conditions of any kind. We assume no responsibility for errors or omissions in the results and interpretations following from application of TIGRAMITE.

You commit to cite above papers in your reports or publications.


## License

Copyright (C) 2014-2023 Jakob Runge

See license.txt for full text.

GNU General Public License v3.0

TIGRAMITE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. TIGRAMITE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jakobrunge/tigramite/",
    "name": "tigramite",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "causal inference,causal discovery,prediction,time series",
    "author": "Jakob Runge",
    "author_email": "jakob@jakob-runge.com",
    "download_url": "https://files.pythonhosted.org/packages/25/19/6aa68c7f10a269f6cf286a885f6716c7f520cde57ffd65a0acbe1d15afd0/tigramite-5.2.5.1.tar.gz",
    "platform": null,
    "description": "# Tigramite \u2013 Causal inference for time series datasets\n![logo](docs/_images/tigramite_logo_header.png)\nVersion 5.2\n(Python Package)\n\n[Github](https://github.com/jakobrunge/tigramite.git)\n\n[Documentation](https://jakobrunge.github.io/tigramite/)\n\n[Tutorials](https://github.com/jakobrunge/tigramite/tree/master/tutorials/)\n\n## Overview\n\nIt's best to start with our [Overview/review paper: Causal inference for time series](https://github.com/jakobrunge/tigramite/blob/master/tutorials/Runge_Causal_Inference_for_Time_Series_NREE.pdf)\n\n__Update:__ Tigramite now has a new CausalEffects class that allows to estimate (conditional) causal effects and mediation based on assuming a causal graph. Have a look at the tutorial.\n\nFurther, Tigramite provides several causal discovery methods that can be used under different sets of assumptions. An application always consists of a method and a chosen conditional independence test, e.g. PCMCIplus together with ParCorr. The following two tables give an overview of the assumptions involved:\n\n| Method | Assumptions         | Output |\n| :-- | :-- | :-- |\n|         |   (in addition to Causal Markov Condition and Faithfulness)   |    |\n| PCMCI  | Causal stationarity, no contemporaneous causal links, no hidden variables |  Directed lagged links, undirected contemporaneous links (for tau_min=0)  |\n| PCMCIplus | Causal stationarity, no hidden variables    | Directed lagged links, directed and undirected contemp. links (Time series CPDAG) |\n| LPCMCI | Causal stationarity    | Time series PAG |\n| RPCMCI  | No contemporaneous causal links, no hidden variables |  Regime-variable and causal graphs for each regime with directed lagged links, undirected contemporaneous links (for tau_min=0)  |\n| J-PCMCI+ | Multiple datasets, causal stationarity, no hidden system confounding, except if context-related   | Directed lagged links, directed and undirected contemp. links (Joint time series CPDAG) |\n\n\n| Conditional independence test | Assumptions                                                                                            |\n| :-- | :-- | \n| ParCorr                       | univariate, continuous variables with linear dependencies and Gaussian noise                           |\n| RobustParCorr                 | univariate, continuous variables with linear dependencies, robust for different marginal distributions |\n| ParCorrWLS                    | univariate, continuous variables with linear dependencies, can account for heteroskedastic data        |\n| GPDC / GPDCtorch              | univariate, continuous variables with additive dependencies                                            |\n| CMIknn                        | multivariate, continuous variables with more general dependencies (permutation-based test)             |\n| Gsquared                      | univariate discrete/categorical variables                                                              |\n| CMIsymb                       | multivariate discrete/categorical variables (permutation-based test)                                   |\n| RegressionCI                  | mixed datasets with univariate discrete/categorical and (linear) continuous variables                  |\n\n\n## General Notes\n\nTigramite is a causal inference for time series python package. It allows to efficiently estimate causal graphs from high-dimensional time series datasets (causal discovery) and to use graphs for robust forecasting and the estimation and prediction of direct, total, and mediated effects. Causal discovery is based on linear as well as non-parametric conditional independence tests applicable to discrete or continuously-valued time series. Also includes functions for high-quality plots of the results. Please cite the following papers depending on which method you use:\n\n- Overview: Runge, J., Gerhardus, A., Varando, G. et al. Causal inference for time series. Nat Rev Earth Environ (2023). https://doi.org/10.1038/s43017-023-00431-y\n\n- PCMCI: J. Runge, P. Nowack, M. Kretschmer, S. Flaxman, D. Sejdinovic, Detecting and quantifying causal associations in large nonlinear time series datasets. Sci. Adv. 5, eaau4996 (2019). https://advances.sciencemag.org/content/5/11/eaau4996\n- PCMCI+: J. Runge (2020): Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets. Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence, UAI 2020,Toronto, Canada, 2019, AUAI Press, 2020. http://auai.org/uai2020/proceedings/579_main_paper.pdf\n- LPCMCI: Gerhardus, A. & Runge, J. High-recall causal discovery for autocorrelated time series with latent confounders Advances in Neural Information Processing Systems, 2020, 33. https://proceedings.neurips.cc/paper/2020/hash/94e70705efae423efda1088614128d0b-Abstract.html\n- RPCMCI: Elena Saggioro, Jana de Wiljes, Marlene Kretschmer, Jakob Runge; Reconstructing regime-dependent causal relationships from observational time series. Chaos 1 November 2020; 30 (11): 113115. https://doi.org/10.1063/5.0020538\n- Generally: J. Runge (2018): Causal Network Reconstruction from Time Series: From Theoretical Assumptions to Practical Estimation. Chaos: An Interdisciplinary Journal of Nonlinear Science 28 (7): 075310. https://aip.scitation.org/doi/10.1063/1.5025050\n- Nature Communications Perspective paper: https://www.nature.com/articles/s41467-019-10105-3\n- Mediation class: J. Runge et al. (2015): Identifying causal gateways and mediators in complex spatio-temporal systems. Nature Communications, 6, 8502. http://doi.org/10.1038/ncomms9502\n- Mediation class: J. Runge (2015): Quantifying information transfer and mediation along causal pathways in complex systems. Phys. Rev. E, 92(6), 62829. http://doi.org/10.1103/PhysRevE.92.062829\n- CMIknn: J. Runge (2018): Conditional Independence Testing Based on a Nearest-Neighbor Estimator of Conditional Mutual Information. In Proceedings of the 21st International Conference on Artificial Intelligence and Statistics. http://proceedings.mlr.press/v84/runge18a.html\n- CausalEffects: J. Runge, Necessary and sufficient graphical conditions for optimal adjustment sets in causal graphical models with hidden variables, Advances in Neural Information Processing Systems, 2021, 34. https://proceedings.neurips.cc/paper/2021/hash/8485ae387a981d783f8764e508151cd9-Abstract.html\n\n## Features\n\n- flexible conditional independence test statistics adapted to\n  continuously-valued, discrete and mixed data, and different assumptions about\n  linear or nonlinear dependencies\n- handling of missing values and masks\n- p-value correction and (bootstrap) confidence interval estimation\n- causal effect class to  non-parametrically estimate (conditional) causal effects and also linear mediated causal effects\n- prediction class based on sklearn models including causal feature selection\n\n## Required python packages\n\n- python=3.7/3.8/3.9/3.10\n- numpy <1.24,>=1.18\n- scipy>=1.10.0\n- numba==0.56.4\n\n## Optional packages depending on used functions\n- scikit-learn>=1.2   # Gaussian Process (GP) Regression\n- matplotlib>=3.7.0   # Plotting\n- seaborn>=0.12.2     # Plotting\n- networkx>=3.0       # Plotting\n- torch>=1.13.1       # GPDC pytorch version (in conda install pytorch)\n- gpytorch>=1.9.1     # GPDC gpytorch version\n- dcor>=0.6           # GPDC distance correlation version\n- joblib>=1.2.0       # CMIsymb shuffle parallelization\n- ortools>=9.2        # RPCMCI\n\n## Installation\n\npython setup.py install\n\nThis will install tigramite in your path.\n\nTo use just the ParCorr, CMIknn, and CMIsymb independence tests, only numpy/numba and scipy are required. For other independence tests more packages are required:\n\n- GPDC: scikit-learn is required for Gaussian Process regression and dcor for distance correlation\n\n- GPDCtorch: gpytorch is required for Gaussian Process regression\n\nNote: Due to incompatibility issues between numba and numpy, we currently enforce soft dependencies on the versions.\n\n## User Agreement\n\nBy downloading TIGRAMITE you agree with the following points: TIGRAMITE is provided without any warranty or conditions of any kind. We assume no responsibility for errors or omissions in the results and interpretations following from application of TIGRAMITE.\n\nYou commit to cite above papers in your reports or publications.\n\n\n## License\n\nCopyright (C) 2014-2023 Jakob Runge\n\nSee license.txt for full text.\n\nGNU General Public License v3.0\n\nTIGRAMITE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. TIGRAMITE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3.0",
    "summary": "Tigramite causal inference for time series",
    "version": "5.2.5.1",
    "project_urls": {
        "Homepage": "https://github.com/jakobrunge/tigramite/"
    },
    "split_keywords": [
        "causal inference",
        "causal discovery",
        "prediction",
        "time series"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "79f2208c2d572d6904933d4af0d64be3d8dca8f56a0ce31f400f803e602b826e",
                "md5": "5c044c01d139c5749c0f926a822ff22e",
                "sha256": "05e620be2ac337dc3cdc403385a9e43b4aead16410a128276b833f7bc95ac883"
            },
            "downloads": -1,
            "filename": "tigramite-5.2.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c044c01d139c5749c0f926a822ff22e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 295432,
            "upload_time": "2024-02-29T14:42:39",
            "upload_time_iso_8601": "2024-02-29T14:42:39.376792Z",
            "url": "https://files.pythonhosted.org/packages/79/f2/208c2d572d6904933d4af0d64be3d8dca8f56a0ce31f400f803e602b826e/tigramite-5.2.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "25196aa68c7f10a269f6cf286a885f6716c7f520cde57ffd65a0acbe1d15afd0",
                "md5": "95d9e112c44882ceabbd19d822d71f7d",
                "sha256": "1207f1bb1f93df3a947b48752619f04f2de67dc42cf288c9883f15618130949d"
            },
            "downloads": -1,
            "filename": "tigramite-5.2.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "95d9e112c44882ceabbd19d822d71f7d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 298834,
            "upload_time": "2024-02-29T14:42:43",
            "upload_time_iso_8601": "2024-02-29T14:42:43.779630Z",
            "url": "https://files.pythonhosted.org/packages/25/19/6aa68c7f10a269f6cf286a885f6716c7f520cde57ffd65a0acbe1d15afd0/tigramite-5.2.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-29 14:42:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jakobrunge",
    "github_project": "tigramite",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tigramite"
}
        
Elapsed time: 0.20861s