Skip to content

Tigramite 5.2

Latest
Compare
Choose a tag to compare
@jakobrunge jakobrunge released this 17 Mar 21:47
· 214 commits to master since this release
5a87687

Tigramite 5.2 contains many new features and improvements, hence the change in the main version number. The major new features are:

  • Dataframe
    • now supports multiple time series arrays to learn one joint graph. Together with sliding_windows this allows to estimate graphs for every time step (or range) if multiple datasets for each time step are available. See Tutorial.
    • new data_type to indicate categorical/numerical data, used e.g. for CI tests
  • Expanded CI test suite:
    • Implementation of Gsquared for categorical data with asymptotic null distribution
    • Improved (now multivariate) CMIsymb for categorical data with local permutation test. Uses joblib to parallelize permutations across cpu-cores for null distribution generation.
    • RegressionCI (linear dependencies) for mixed data sets (arbitrary mix of continuous and categorical data)
    • RobustParCorr - Robust partial correlation test based on non-paranormal models.
    • ParCorrWLS - Weighted partial correlation test that accounts for heteroskedastic noises.
    • ParCorrMult - Partial correlation test for multivariate X and Y
  • Causal discovery functions:
    • Sliding window function can now be combined with MultiData functionality and LPCMCI
    • link_assumptions replaces selected_links. The existence, absence, and orientation can now be encoded - New function return_summary_results to aggregate results from multiple PCMCI/PCMCIplus/... analyses. Also available for LPCMCI.
    • New function to generate random structural causal processes for benchmarking
    • New function 'surrogate generator' can generate multiple realizations from a model fitted on data
    • Implementation of Regime-PCMCI to learn causal regimes from multivariate time series
  • Causal effects:
    • CausalEffects class now supports hidden variables in stationary time series graphs
    • CausalEffects now runs also with logistic regression
    • added aggregation_func to aggregate over prediction
    • improved bootstrap confidence inkl block-length selection for all functions
    • models.py now handles empty sets of predictors by user-specified function, default is mean(y).
  • LinearMediation
    • can now handle contemporaneous links
    • now has bootstrap confidence inkl block-length selection for all functions via get_bootstrap_of
    • get_conditional_mce to estimate paths that cross through certain nodes, but not through others
  • Plotting:
    • Pairwise scatter plots and density plots in plotting.py can now be used to visualize dependencies and choose an appropriate conditional independence (CI) test.
    • plot_graph can now show auto-dependency-links by show_autodependency_lags=True.
    • Improved graph objects, now returned as axes in order to integrate them into subplots.
    • New transform-parameter to draw graphs onto maps using, eg, node_pos['transform']=ccrs.PlateCarree()
    • new write_csv() function in plotting.py to write all links of a graph in a file.
  • toy models:
    • new function generate_structural_causal_process to generate random time-dependent models with flexible functional relations and options to generate interventional data
  • Tutorials:
    • new folder structure
    • "basic" tutorial now called "overview"
    • new tutorial on "explaining_lag_functions" which can be helpful to validate causal models.
    • tutorial for Regime-PCMCI
  • Package demands:
    • environment_py3.yml for conda only installs the necessary barebone packages. The optional packages are to be installed according to your needs. See Readme and setup.py for optional packages and the recommended version numbers.

Installation

  • Option 1: Install via "pip install tigramite"
  • Option 2: Pull new version from master branch, install via python setup.py install

Breaking Changes

  • Specific conditional independence tests are now called with the syntax - from tigramite.independence_tests.<independence_test>.py import .
    Example: from tigramite.independence_tests.parcorr import ParCorr instead of from tigramite.independence_tests import ParCorr.
    Refer to tigramite_tutorial_conditional_independence_tests.ipynb for import syntax to all CI tests.
  • Shuffle test now uses fewer surrogates by default to speed it up: sig_samples = 500 instead of 1000.
  • run_sliding_windows now has default conf_lev=0.9
  • seaborn package required for density plots

Bug Fixes

  • fixed bug with method='links_coeffs' in fit_wright_effect in CausalEffects
  • Small fixes in pcmci.py and plotting.py
  • Sphinx generated documentation for plotting.py
  • pairwise scatter_plot for auto-dependency corrected.
  • fixed bug in CausalEffects regarding '+*>' links

Improvements

  • Comprehensive test suite expanded
  • Take a look at the new tutorials to see all functionality
  • plot_graph can now also displays auto-dependencies at the nodes with the flag show_autodependecies=True
  • scatter plot and density plots can show auto-dependency joint kernel density plots along the diagonal with the flag show_marginal_densities_on_diagonal = False
  • Colorbars in plot_graph for nodes and links now both have the same default range
  • Adapted to the new way of using numpy's random functions using Generators.
  • Nicer arrows and colorbars, new argument tick_label_size
  • Further improvements throughout plotting.py and data_processing.py

What's Changed

Full Changelog: 4.2...5.2