Skip to content

Blopeur/tigramite

Repository files navigation

TIGRAMITE – Causal discovery for time series datasets

Version 4.1 described in https://advances.sciencemag.org/content/5/11/eaau4996

(Python Package)

Github

Documentation

General Notes

Tigramite is a causal time series analysis python package. It allows to efficiently reconstruct causal graphs from high-dimensional time series datasets and model the obtained causal dependencies for causal mediation and prediction analyses. Causal discovery is based on linear as well as non-parametric conditional independence tests applicable to discrete or continuously-valued time series. Currently, tigramite cannot identify causal directionality for contemporaneous links which are left undirected. Also includes functions for high-quality plots of the results. Please cite the following papers depending on which method you use:

Features

  • high detection power even for large-scale time series datasets
  • flexible conditional independence test statistics adapted to continuously-valued or discrete data, and different assumptions about linear or nonlinear dependencies
  • automatic hyperparameter optimization for most tests
  • parallel computing script based on mpi4py
  • handling of missing values and masks
  • p-value correction and confidence interval estimation
  • causal mediation class to analyze causal pathways
  • prediction class based on sklearn models including causal feature selection
  • currently, tigramite cannot identify causal directionality for contemporaneous links which are left undirected

Required python packages

  • numpy>=1.10.0
  • scipy>=0.17.0
  • scikit-learn>=0.18.1 (optional, necessary for GPDC test)
  • matplotlib>=1.5.1 (optional, only for plotting)
  • networkx=1.10.0 (optional, only for plotting and mediation)
  • cython>=0.26 (optional, necessary for CMIknn and GPDC tests)
  • mpi4py>=2.0.0 (optional, necessary for using the parallelized implementation)
  • rpy2>=2.8 (optional, necessary for RCOT test)

Installation

python setup.py install

This will install tigramite in your path.

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

  • CMIknn: cython can optionally be used for compilation, otherwise the provided ``*.c'' file is used

  • GPDC: also based on cython, and additionally, scikit-learn is required for Gaussian Process regression

  • RCOT requires more work: Firstly, rpy2 is required to access R-packages. The required R-packages can be installed with the script ``install_r_packages.sh''. Due to R-related issues, the installation of R's devtools might fail when running "install_r_packages.sh". This can be solved e.g. by installing missing / not resolved R dependencies using conda: "conda install r-git2r".

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-2019 Jakob Runge

See license.txt for full text.

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published