Package: pyspi-lib
pyspi: Python Toolkit of Statistics for Pairwise Interactionspyspiis 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 theGNU GPL v3 license(or later).Feel free to reach out for help with real-world applications.Feedback is much appreciated throughissues, orpull requests.SectionDescriptionInstallationInstallingpyspiand its dependenciesGetting StartedA quick introduction on how to get started withpyspiSPI DescriptionsA link to the full table of SPIs and detailed descriptionsDocumentationA link to our API reference and full documentation on GitBooksContributing topyspiA guide for community members willing to contribute topyspiAcknowledgementA citation forpyspifor scholarly articlesOur ContributorsA summary of our primary contributorsInstallation 📥The simplest way to get thepyspipackage up and running is to install the package locally usingpip.
For access to the full library of SPIs, the code requires GNU'sOctaveto be installed on your system.1. Pre-Install Octave (Optional)While you can safely installpyspiwithout first installingOctave, you will not have access to the full library of SPIs2. Create a conda environment (Optional, Recommended)While you can also installpyspioutside of a conda environment, it depends on a lot of user packages that may make managing dependencies quite difficult.
So, we would also recommend installing pyspi in a conda environment. Firstly, create a fresh conda environment:conda create -n pyspi python=3.9.0Once you have created the environment, activate it usingconda activate pyspi.3. Install withpipTo installpyspiusing a local pip install, download or clone the latest version from the repository:git clone https://github.com/DynamicsAndNeuralSystems/pyspiOnce you have navigated to the main folder (pyspi), you can install using:pip install .For a more detailed guide on how to installpyspi, as well as how you can usepyspiwithout first installing Octave,
please see thefull documentation.
Additionally, we provide a comprehensivetroubleshooting guidefor users who encounter issues installingpyspion their system,
as well asalternative installation options.Getting Started 🚀Once you have installedpyspi, you can learn how to apply the package by checking out thewalkthrough tutorialsin our documentation.  Click any of the examples below to access the tutorials in our full documentation:Simple demonstrationFinance: stock price time seriesNeuroimaging: fMRI time series)Advanced UsageFor advanced users, we offer several additional guides in thefull documentationon how you can distribute yourpyspijobs across PBS clusters, as well as how you can construct your own subsets of SPIs.
Click one of the following dropdowns for more information:Distributing pyspi calculationsIf you have access to a PBS cluster and are processing MTS with many processes (or are analyzing many MTS), then you may find thepyspi distributerepository helpful.
In the fulldocumentation, we provide a comprehensive guide on how you can distributepyspicalculations on a PBS cluster, along with the necessary scripts and commands to get started!Reduced subsetsIf 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.
Follow the guide in thedocumentationto learn how you can create your own reduced subsets.SPI Descriptions 📋To access a table with a high-level overview of thepyspilibrary of SPIs, including their associated identifiers, see thetable of SPIsin the full documentation.
For detailed descriptions of each SPI, as well as its associated estimators, we provide a full breakdown in theSPI descriptionspage of our documentation.DocumentationThe full documentation is hosted onGitBooks.
Use the following links to quickly access some of the key sections:Full installation guideTroubleshootingAlternative installation optionsUsage guideDistributingpyspicomputationsTable of SPIs and descriptionsFAQAPI ReferenceDevelopment guideContributing topyspi👨‍👨‍👦‍👦Contributions play a vital role in the continual development and enhancement ofpyspi, a project built and enriched through community collaboration.
If you would like to contribute topyspi, or explore the many ways in which you can participate in the project, please have a look at our
detailedcontribution guidelinesabout how to proceed.
In contributing topyspi, all participants are expected to adhere to ourcode of conduct.SPI WishlistWe strive to provide the most comprehensive toolkit of SPIs. If you have ideas for new SPIs or suggestions for improvements to existing ones, we are eager to hear from and collaborate with you!
Any pairwise dependence measure, provided it is accompanied by a published research paper, typically falls within the scope for consideration in thepyspilibrary.
You can access our SPI wishlist via theprojects tabin this repo to open a request.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 thatpreprintandfree-to-readversions of this article are available.Click here for a BibTex reference:@article{Cliff2023:UnifyingPairwiseInteractions,
	title = {Unifying pairwise interactions in complex dynamics},
	volume = {3},
	issn = {2662-8457},
	url = {https://www.nature.com/articles/s43588-023-00519-x},
	doi = {10.1038/s43588-023-00519-x},
	number = {10},
	journal = {Nature Computational Science},
	author = {Cliff, Oliver M. and Bryant, Annie G. and Lizier, Joseph T. and Tsuchiya, Naotsugu and Fulcher, Ben D.},
	month = oct,
	year = {2023},
	pages = {883--893},
}Other highly comparative toolboxes 🧰If you are interested in trying other highly comparative toolboxes likepyspi, see the below list:hctsa, thehighly comparative time-series analysistoolkit, computes over 7000 time-series features from univariate time series.hcga, ahighly comparative graph analysistoolkit, computes several thousands of graph features directly from any given network.Our Contributors 🌟We are thankful for the contributions of each and everyone who has helped make this project better.
Whether you've added a line of code, improved our documentation, or reported an issue, your contributions are greatly appreciated!
Below are some of the leading contributors topyspi:License 🧾pyspiis released under theGNU General Public License.