Skip to content

mb-BCA/SiReNetA

Repository files navigation

SiReNetA

NOTE! Current version is an "alpha - development" for testing and validation. Heavy changes expected until release of version 1.0, expected end of April 2024. Stay tuned or follow @GZamora_Lopez in Twitter.

If only interested in the leaky-cascade canonical model (multivariate Ornstein-Uhlenbeck), for now, we recommend to continue using the NetDynFlow package until SiReNetA supersedes NetDynFlow.

Sitmulus-Response Network Analysis (SiReNetA) : A library for the study of complex networks in the light of canonical propagation models.

Graph theory constitutes a widely used and established field providing powerful tools for the characterisation of complex networks. However, the diversity of complex networks studied nowadays overcomes the capabilities of graph theory (originally developed for binary adjacency matrices) to understand networks and their function. In the recent years plenty of alternative metrics have been proposed which are–one way or another–based on dynamical phenomena happening on networks.

Stimulus-Response Network Analysis (SRNA) proposes a generalised course of action to derive network metrics and characterise networks from the viewpoint of dynamical systems, valid for different canonical propagation models. The first step of the analysis consists of selecting an adequate propagation model that respects minimal constraints and assumptions of the real network under investigation. Once the model is chosen, the temporal pair-wise (conditional) responses $R_{ij}(t)$ that nodes exert on each other are estimated. Finally information about the network is derived out of the observed responses.

Visit https://github.com/mb-BCA/SiReNetA_Tutorials for tutorials and practical examples of how to use 'Response Network Analysis' and the SiReNetA library.

References and Citation

 

INSTALLATION

Installation of SiReNetA is simple. The only requirements are an existing python distribution and the pip package manager. If Python was installed via the Anaconda or another Python distribution, then 'pip' is surely installed. To check, open a terminal and type:

$ pip --help

SiReNetA is still not registered in PyPI (the Python Package Index) and installation follows directly from GitHub. However, pip will automatically take care of the dependencies (see the requirements.txt file). There are two alternative manners to install.

A) Direct installation from GitHub: Open a terminal and enter:

$ pip install git+https://github.com/mb-BCA/SiReNetA.git@master

This will install the folder "sireneta/" of this repository into the "…/site-packages/" folder of your current python environment. To confirm the installation open an interactive session and try to import the library by typing import sireneta.

The installation command can also be run from a cell in a Jupyter notebook. In that case, begin the cell with "%", what allows to run terminal commands. Type the following in a cell of the notebook :

%pip install git+https://github.com/mb-BCA/SiReNetA.git@master

B) Download and install: Visit the GitHub repository https://github.com/mb-BCA/SiReNetA/ and click on the "<> Code" button at the right hand side (the green button). Select "Download ZIP". Download to a preferred path, e.g.' "~/Downloads/" and unzip the file. Open a terminal and move to that folder, e.g.,

$ cd ~/Downloads/sireneta-master/

Make sure this folder is the one containing the setup.py file. Then, type:

$ pip install .

Do not forget the "." at the end which means "install from this directory using the code in setup.py." This will check for the dependencies and install SiReNetA. To confirm the installation open an interactive session and try to import the library by typing import sireneta. After installation the folder "~/Downloads/sireneta-master/" can be safely deleted.

 

ORGANISATION AND DOCUMENTATION

The library is organised into the following user modules:

  • responses.py : Functions to calculate the spatio-temporal evolution of pair-wise node responses $R_{ij}(t)$ to initial unit stimuli, under different canonical models.
  • metrics.py : Descriptors to characterise the networks out of the $R_{ij}(t)$ spatio-temporal responses.
  • simulate.py : Functions to run simulations of the different canonical models on networks.
  • tools.py : Miscellaneous functionalities.

The documentation of the library can be accessed 'online' typing help(module_name) in a Python interactive session, or typing module_name? in IPython or a Jupyter notebook. For example, to see the principal description of SiReNetA, type :

>>> import sireneta as sna
>>> sna?

To see the list of functions available in each of the modules, call their documentation as :

>>> sna.responses?
>>> sna.metrics?
>>> sna.simulate?
>>> sna.tools?

Details of each function can also be seen using the usual help,

>>> sna.module_name.func_name?

NOTE: Importing SiReNetA brings all functions in the modules responses.py and metrics.py into the local namespace. Therefore, these functions can be called as sna.func() instead of sna.responses.func() or sna.metrics.func().

 

LICENSE

Copyright 2024, Gorka Zamora-López and Matthieu Gilson. Contact: [email protected]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.



VERSION HISTORY

March 14, 2024

Fixed the new aliases for int and float in Numpy. All arrays are now declared as np.int64 or np.float64, and individual numbers as standard Python int or float.

March 7, 2024

SiReNetA is made publicly available in alpha - development version for testing and referencing. Both internal (e.g., specifics of algorithms) and external (e.g., names of functions) changes may happen before final release of version 1.0. Comments, bug reports and recommendations are welcome.

About

Stimulus-Response Network Analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages