pyspi: Python Toolkit of Statistics for Pairwise Interactions
pyspi is a comprehensive python library for computing statistics of pairwise interactions (SPIs) from multivariate time-series (MTS) data. The toolbox provides easy access to hundreds of methods for evaluating the relationship between pairs of time series, from simple statistics (like correlation) to advanced multi-step algorithms (like Granger causality). The code is licensed under the GNU GPL v3 license (or later).
Feel free to reach out for help with real-world applications. Feedback is much appreciated through issues, or pull requests.
Acknowledgement 👍
If you use this software, please read and cite this article:
- 📗 O.M. Cliff, A.G. Bryant, J.T. Lizier, N. Tsuchiya, B.D. Fulcher. Unifying pairwise interactions in complex dynamics, Nature Computational Science (2023).
Note that preprint and free-to-read versions of this article are available.
Getting Started
See the documentation for installing and setting up pyspi. Once you're done, you can learn how to use the package by checking out the:
If you have access to a PBS cluster and are processing MTS with many processes (or are analyzing many MTS), then you may find the pyspi distribute repository helpful.
If your dataset is large (containing many processes and/or observations), you can use a pre-configured set of reduced statistics or create your own subsets (cf. the documentation guide).
Other highly comparative toolboxes
- hctsa, the highly comparative time-series analysis toolkit, computes over 7000 time-series features from univariate time series.
- hcga, a highly comparative graph analysis toolkit, computes several thousands of graph features directly from any given network.
SPI Wishlist
As pyspi is under active development, we are always open to suggestions for new SPIs to be added via the projects tab in this repo.