vbi 0.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vbi-0.1.3/.github/workflows/docker-image.yml +51 -0
- vbi-0.1.3/.github/workflows/tests.yml +24 -0
- vbi-0.1.3/.gitignore +45 -0
- vbi-0.1.3/.readthedocs.yaml +19 -0
- vbi-0.1.3/CONTRIBUTING.md +64 -0
- vbi-0.1.3/LICENSE +201 -0
- vbi-0.1.3/MANIFEST.in +7 -0
- vbi-0.1.3/PKG-INFO +166 -0
- vbi-0.1.3/README.md +111 -0
- vbi-0.1.3/docs/API.rst +71 -0
- vbi-0.1.3/docs/Makefile +21 -0
- vbi-0.1.3/docs/_static/Fig1.png +0 -0
- vbi-0.1.3/docs/_static/custom.css +32 -0
- vbi-0.1.3/docs/_static/vbi_flowchart.png +0 -0
- vbi-0.1.3/docs/_static/vbi_log.png +0 -0
- vbi-0.1.3/docs/conf.py +62 -0
- vbi-0.1.3/docs/examples/.gitattributes +1 -0
- vbi-0.1.3/docs/examples/.ipynb_checkpoints/intro-checkpoint.ipynb +56 -0
- vbi-0.1.3/docs/examples/__pycache__/helpers.cpython-310.pyc +0 -0
- vbi-0.1.3/docs/examples/data/centers.txt +84 -0
- vbi-0.1.3/docs/examples/data/centres.txt +84 -0
- vbi-0.1.3/docs/examples/data/cortical.txt +84 -0
- vbi-0.1.3/docs/examples/data/tract_lengths.txt +84 -0
- vbi-0.1.3/docs/examples/data/weights.txt +84 -0
- vbi-0.1.3/docs/examples/data/weights1.txt +84 -0
- vbi-0.1.3/docs/examples/data/weights_68.txt +68 -0
- vbi-0.1.3/docs/examples/do_cpp.ipynb +409 -0
- vbi-0.1.3/docs/examples/do_nb.ipynb +451 -0
- vbi-0.1.3/docs/examples/ghb_sde_cupy.ipynb +206 -0
- vbi-0.1.3/docs/examples/helpers.py +151 -0
- vbi-0.1.3/docs/examples/intro.ipynb +179 -0
- vbi-0.1.3/docs/examples/intro_feature.ipynb +443 -0
- vbi-0.1.3/docs/examples/jansen_rit_sde_cpp.ipynb +460 -0
- vbi-0.1.3/docs/examples/jansen_rit_sde_cupy.ipynb +431 -0
- vbi-0.1.3/docs/examples/mpr_sde_cpp.ipynb +169 -0
- vbi-0.1.3/docs/examples/mpr_sde_cupy.ipynb +605 -0
- vbi-0.1.3/docs/examples/mpr_sde_numba.ipynb +264 -0
- vbi-0.1.3/docs/examples/mpr_tvbk.ipynb +200 -0
- vbi-0.1.3/docs/examples/my_features.json +25 -0
- vbi-0.1.3/docs/examples/my_features.py +73 -0
- vbi-0.1.3/docs/examples/output/damp_oscillator_ts.jpeg +0 -0
- vbi-0.1.3/docs/examples/output/stat_vec.pt +0 -0
- vbi-0.1.3/docs/examples/output/theta.pt +0 -0
- vbi-0.1.3/docs/examples/output/vep/posterior.pkl +0 -0
- vbi-0.1.3/docs/examples/output/vep84/posterior.pkl +0 -0
- vbi-0.1.3/docs/examples/sbi-logs/NPE_C/2025-03-24T17_33_52.754987/events.out.tfevents.1742834032.ziaee.319710.0 +0 -0
- vbi-0.1.3/docs/examples/vep_sde.ipynb +563 -0
- vbi-0.1.3/docs/examples/ww_sde_torch_kong.ipynb +179 -0
- vbi-0.1.3/docs/index.rst +143 -0
- vbi-0.1.3/docs/models.rst +532 -0
- vbi-0.1.3/docs/requirements.txt +13 -0
- vbi-0.1.3/pyproject.toml +112 -0
- vbi-0.1.3/setup.cfg +4 -0
- vbi-0.1.3/setup.py +72 -0
- vbi-0.1.3/vbi/__init__.py +37 -0
- vbi-0.1.3/vbi/_version.py +17 -0
- vbi-0.1.3/vbi/dataset/__init__.py +0 -0
- vbi-0.1.3/vbi/dataset/connectivity_84/centers.txt +84 -0
- vbi-0.1.3/vbi/dataset/connectivity_84/centres.txt +84 -0
- vbi-0.1.3/vbi/dataset/connectivity_84/cortical.txt +84 -0
- vbi-0.1.3/vbi/dataset/connectivity_84/tract_lengths.txt +84 -0
- vbi-0.1.3/vbi/dataset/connectivity_84/weights.txt +84 -0
- vbi-0.1.3/vbi/dataset/connectivity_88/Aud_88.txt +88 -0
- vbi-0.1.3/vbi/dataset/connectivity_88/Bold.npz +0 -0
- vbi-0.1.3/vbi/dataset/connectivity_88/Labels.txt +17 -0
- vbi-0.1.3/vbi/dataset/connectivity_88/Region_labels.txt +88 -0
- vbi-0.1.3/vbi/dataset/connectivity_88/tract_lengths.txt +88 -0
- vbi-0.1.3/vbi/dataset/connectivity_88/weights.txt +88 -0
- vbi-0.1.3/vbi/feature_extraction/__init__.py +1 -0
- vbi-0.1.3/vbi/feature_extraction/calc_features.py +293 -0
- vbi-0.1.3/vbi/feature_extraction/features.json +535 -0
- vbi-0.1.3/vbi/feature_extraction/features.py +2124 -0
- vbi-0.1.3/vbi/feature_extraction/features_settings.py +374 -0
- vbi-0.1.3/vbi/feature_extraction/features_utils.py +1357 -0
- vbi-0.1.3/vbi/feature_extraction/infodynamics.jar +0 -0
- vbi-0.1.3/vbi/feature_extraction/utility.py +507 -0
- vbi-0.1.3/vbi/inference.py +98 -0
- vbi-0.1.3/vbi/models/__init__.py +0 -0
- vbi-0.1.3/vbi/models/cpp/__init__.py +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/__init__.py +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/__pycache__/mpr_sde.cpython-310.pyc +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_do.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_jr_sdde.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_jr_sde.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_km_sde.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_mpr_sde.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_vep.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/_wc_ode.cpython-310-x86_64-linux-gnu.so +0 -0
- vbi-0.1.3/vbi/models/cpp/_src/bold.hpp +303 -0
- vbi-0.1.3/vbi/models/cpp/_src/do.hpp +167 -0
- vbi-0.1.3/vbi/models/cpp/_src/do.i +17 -0
- vbi-0.1.3/vbi/models/cpp/_src/do.py +467 -0
- vbi-0.1.3/vbi/models/cpp/_src/do_wrap.cxx +12811 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sdde.hpp +352 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sdde.i +19 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sdde.py +688 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sdde_wrap.cxx +18718 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sde.hpp +264 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sde.i +17 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sde.py +470 -0
- vbi-0.1.3/vbi/models/cpp/_src/jr_sde_wrap.cxx +13406 -0
- vbi-0.1.3/vbi/models/cpp/_src/km_sde.hpp +158 -0
- vbi-0.1.3/vbi/models/cpp/_src/km_sde.i +19 -0
- vbi-0.1.3/vbi/models/cpp/_src/km_sde.py +671 -0
- vbi-0.1.3/vbi/models/cpp/_src/km_sde_wrap.cxx +17367 -0
- vbi-0.1.3/vbi/models/cpp/_src/makefile +52 -0
- vbi-0.1.3/vbi/models/cpp/_src/mpr_sde.hpp +327 -0
- vbi-0.1.3/vbi/models/cpp/_src/mpr_sde.i +19 -0
- vbi-0.1.3/vbi/models/cpp/_src/mpr_sde.py +711 -0
- vbi-0.1.3/vbi/models/cpp/_src/mpr_sde_wrap.cxx +18618 -0
- vbi-0.1.3/vbi/models/cpp/_src/utility.hpp +307 -0
- vbi-0.1.3/vbi/models/cpp/_src/vep.hpp +171 -0
- vbi-0.1.3/vbi/models/cpp/_src/vep.i +16 -0
- vbi-0.1.3/vbi/models/cpp/_src/vep.py +464 -0
- vbi-0.1.3/vbi/models/cpp/_src/vep_wrap.cxx +12968 -0
- vbi-0.1.3/vbi/models/cpp/_src/wc_ode.hpp +294 -0
- vbi-0.1.3/vbi/models/cpp/_src/wc_ode.i +19 -0
- vbi-0.1.3/vbi/models/cpp/_src/wc_ode.py +686 -0
- vbi-0.1.3/vbi/models/cpp/_src/wc_ode_wrap.cxx +24263 -0
- vbi-0.1.3/vbi/models/cpp/damp_oscillator.py +143 -0
- vbi-0.1.3/vbi/models/cpp/jansen_rit.py +543 -0
- vbi-0.1.3/vbi/models/cpp/km.py +187 -0
- vbi-0.1.3/vbi/models/cpp/mpr.py +289 -0
- vbi-0.1.3/vbi/models/cpp/vep.py +150 -0
- vbi-0.1.3/vbi/models/cpp/wc.py +216 -0
- vbi-0.1.3/vbi/models/cupy/__init__.py +0 -0
- vbi-0.1.3/vbi/models/cupy/bold.py +111 -0
- vbi-0.1.3/vbi/models/cupy/ghb.py +284 -0
- vbi-0.1.3/vbi/models/cupy/jansen_rit.py +473 -0
- vbi-0.1.3/vbi/models/cupy/km.py +224 -0
- vbi-0.1.3/vbi/models/cupy/mpr.py +475 -0
- vbi-0.1.3/vbi/models/cupy/mpr_modified_bold.py +12 -0
- vbi-0.1.3/vbi/models/cupy/utils.py +184 -0
- vbi-0.1.3/vbi/models/numba/__init__.py +0 -0
- vbi-0.1.3/vbi/models/numba/_ww_EI.py +444 -0
- vbi-0.1.3/vbi/models/numba/damp_oscillator.py +162 -0
- vbi-0.1.3/vbi/models/numba/ghb.py +208 -0
- vbi-0.1.3/vbi/models/numba/mpr.py +383 -0
- vbi-0.1.3/vbi/models/pytorch/__init__.py +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/default_parameters.npz +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/ROI_sim.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fc_test.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fc_train.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fc_vali.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fcd_test.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fcd_test_high_window.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fcd_test_low_window.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fcd_train.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/fcd_vali.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/myelin.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/rsfc_gradient.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/run_label_testset.mat +0 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/sc_test.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/sc_train.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/input/sc_vali.csv +68 -0
- vbi-0.1.3/vbi/models/pytorch/data/obs_kong0.npz +0 -0
- vbi-0.1.3/vbi/models/pytorch/ww_sde_kong.py +570 -0
- vbi-0.1.3/vbi/models/tvbk/__init__.py +9 -0
- vbi-0.1.3/vbi/models/tvbk/tvbk_wrapper.py +166 -0
- vbi-0.1.3/vbi/models/tvbk/utils.py +72 -0
- vbi-0.1.3/vbi/papers/__init__.py +0 -0
- vbi-0.1.3/vbi/papers/pavlides_pcb_2015/pavlides.py +211 -0
- vbi-0.1.3/vbi/tests/__init__.py +0 -0
- vbi-0.1.3/vbi/tests/_test_mpr_nb.py +36 -0
- vbi-0.1.3/vbi/tests/test_features.py +355 -0
- vbi-0.1.3/vbi/tests/test_ghb_cupy.py +90 -0
- vbi-0.1.3/vbi/tests/test_mpr_cupy.py +49 -0
- vbi-0.1.3/vbi/tests/test_mpr_numba.py +84 -0
- vbi-0.1.3/vbi/tests/test_suite.py +19 -0
- vbi-0.1.3/vbi/utils.py +402 -0
- vbi-0.1.3/vbi.egg-info/PKG-INFO +166 -0
- vbi-0.1.3/vbi.egg-info/SOURCES.txt +174 -0
- vbi-0.1.3/vbi.egg-info/dependency_links.txt +1 -0
- vbi-0.1.3/vbi.egg-info/requires.txt +42 -0
- vbi-0.1.3/vbi.egg-info/top_level.txt +1 -0
- vbi-0.1.3/vbi_log.png +0 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
name: build & push Docker image to ghcr
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
# branches:
|
6
|
+
# - main # Runs when pushing to develop branch
|
7
|
+
tags:
|
8
|
+
- v* # Runs when pushing tags starting with 'v'
|
9
|
+
|
10
|
+
env:
|
11
|
+
REGISTRY: ghcr.io
|
12
|
+
IMAGE_NAME: ins-amu/vbi # Replace with your organization/package name
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
docker-build:
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v3
|
19
|
+
|
20
|
+
- name: Log in to the Container registry
|
21
|
+
uses: docker/login-action@v3
|
22
|
+
with:
|
23
|
+
registry: ${{ env.REGISTRY }}
|
24
|
+
username: ${{ github.actor }}
|
25
|
+
password: ${{ secrets.CR_PAT }} # Use the PAT here
|
26
|
+
|
27
|
+
- name: Extract metadata (tags, labels) for Docker
|
28
|
+
id: meta
|
29
|
+
uses: docker/metadata-action@v5
|
30
|
+
with:
|
31
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
32
|
+
tags: |
|
33
|
+
type=ref,event=branch
|
34
|
+
type=ref,event=tag
|
35
|
+
|
36
|
+
# Debugging Steps
|
37
|
+
- name: Debug Metadata
|
38
|
+
run: |
|
39
|
+
echo "Tags: ${{ steps.meta.outputs.tags }}"
|
40
|
+
echo "Labels: ${{ steps.meta.outputs.labels }}"
|
41
|
+
|
42
|
+
- name: Debug Docker Info
|
43
|
+
run: docker info
|
44
|
+
|
45
|
+
- name: Build and push Docker image
|
46
|
+
uses: docker/build-push-action@v5
|
47
|
+
with:
|
48
|
+
context: .
|
49
|
+
push: true
|
50
|
+
tags: ${{ steps.meta.outputs.tags }}
|
51
|
+
labels: ${{ steps.meta.outputs.labels }}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v2
|
10
|
+
- name: Set up Python
|
11
|
+
uses: actions/setup-python@v2
|
12
|
+
with:
|
13
|
+
python-version: "3.10"
|
14
|
+
- name: Install dependencies
|
15
|
+
run: |
|
16
|
+
python -m pip install .
|
17
|
+
|
18
|
+
- name: Compile C++ code
|
19
|
+
run: |
|
20
|
+
cd vbi/models/cpp/_src
|
21
|
+
make
|
22
|
+
- name: Run tests
|
23
|
+
run: |
|
24
|
+
python -m pytest
|
vbi-0.1.3/.gitignore
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
*.pt
|
2
|
+
*.txt
|
3
|
+
*.png
|
4
|
+
*.pdf
|
5
|
+
__pycache__/
|
6
|
+
build/
|
7
|
+
_build/
|
8
|
+
.vscode/
|
9
|
+
vbi.egg-info/
|
10
|
+
html/
|
11
|
+
*/cpp/_src*.py
|
12
|
+
*/cpp/_src/*.py
|
13
|
+
.ipynb_checkpoints/
|
14
|
+
latex/
|
15
|
+
html/
|
16
|
+
|
17
|
+
sbi-logs/
|
18
|
+
e/
|
19
|
+
e_*/
|
20
|
+
_e/
|
21
|
+
*/*/*/_src/*.py
|
22
|
+
|
23
|
+
*_wrap.cpp
|
24
|
+
*_wrap.cxx
|
25
|
+
*.o
|
26
|
+
*.dat
|
27
|
+
*.so
|
28
|
+
*.npz
|
29
|
+
*.bin
|
30
|
+
*.sh
|
31
|
+
*.gz
|
32
|
+
*.pickle
|
33
|
+
*.jpeg
|
34
|
+
*.pickle
|
35
|
+
*.pkl
|
36
|
+
.DS_Store
|
37
|
+
.editorconfig
|
38
|
+
*.mat
|
39
|
+
*.csv
|
40
|
+
*.json
|
41
|
+
tt.ipynb
|
42
|
+
*.egg
|
43
|
+
examples_dev/
|
44
|
+
|
45
|
+
vbi/models/cupy/_mpr.py
|
@@ -0,0 +1,19 @@
|
|
1
|
+
version: 2
|
2
|
+
|
3
|
+
build:
|
4
|
+
os: ubuntu-22.04
|
5
|
+
tools:
|
6
|
+
python: "3.10"
|
7
|
+
apt_packages:
|
8
|
+
- swig
|
9
|
+
- build-essential
|
10
|
+
|
11
|
+
|
12
|
+
sphinx:
|
13
|
+
configuration: docs/conf.py
|
14
|
+
|
15
|
+
python:
|
16
|
+
install:
|
17
|
+
- method: pip
|
18
|
+
path: .
|
19
|
+
- requirements: docs/requirements.txt
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Contributing to VBI
|
2
|
+
|
3
|
+
Thank you for your interest in contributing to the VBI project! We welcome contributions in the form of bug reports, feature requests, and code contributions. Please follow the guidelines below to ensure a smooth contribution process.
|
4
|
+
|
5
|
+
## Reporting Issues
|
6
|
+
|
7
|
+
If you encounter any bugs or have feature requests, please open an issue on our [GitHub repository](https://github.com/ins-amu/vbi/issues). Provide as much detail as possible, including steps to reproduce the issue and any relevant logs or screenshots.
|
8
|
+
|
9
|
+
## Code Contributions
|
10
|
+
|
11
|
+
### Getting Started
|
12
|
+
|
13
|
+
1. Fork the repository on GitHub.
|
14
|
+
2. Clone your forked repository to your local machine:
|
15
|
+
```sh
|
16
|
+
git clone https://github.com/your-username/vbi.git
|
17
|
+
cd vbi
|
18
|
+
```
|
19
|
+
3. Install the required dependencies:
|
20
|
+
```sh
|
21
|
+
pip install .
|
22
|
+
# For development, install additional dependencies:
|
23
|
+
pip install -e .[all,dev,docs]
|
24
|
+
```
|
25
|
+
|
26
|
+
### Making Changes
|
27
|
+
|
28
|
+
1. Create a new branch for your feature or bugfix:
|
29
|
+
```sh
|
30
|
+
git checkout -b my-feature-branch
|
31
|
+
```
|
32
|
+
2. Make your changes in the codebase.
|
33
|
+
3. Ensure your code follows our coding standards and includes tests for any new functionality.
|
34
|
+
4. Run the tests to verify your changes:
|
35
|
+
```sh
|
36
|
+
pytest
|
37
|
+
```
|
38
|
+
|
39
|
+
### Submitting a Pull Request
|
40
|
+
|
41
|
+
1. Push your changes to your forked repository:
|
42
|
+
```sh
|
43
|
+
git push origin my-feature-branch
|
44
|
+
```
|
45
|
+
2. Open a pull request on the original repository. Provide a clear description of your changes and any relevant issue numbers.
|
46
|
+
|
47
|
+
### Code Review
|
48
|
+
|
49
|
+
Your pull request will be reviewed by one of the project maintainers. Please be responsive to any feedback and make necessary changes. Once your pull request is approved, it will be merged into the main branch.
|
50
|
+
|
51
|
+
## Coding Standards
|
52
|
+
|
53
|
+
- Follow PEP 8 for Python code style.
|
54
|
+
- Write clear and concise commit messages.
|
55
|
+
- Include docstrings for all functions and classes.
|
56
|
+
- Write tests for any new functionality or bugfixes.
|
57
|
+
|
58
|
+
## Documentation
|
59
|
+
|
60
|
+
If you are contributing to the documentation, make sure to update the relevant `.rst` files in the `docs` directory. You can build the documentation locally using:
|
61
|
+
```sh
|
62
|
+
cd docs
|
63
|
+
make html
|
64
|
+
```
|
vbi-0.1.3/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
vbi-0.1.3/MANIFEST.in
ADDED
vbi-0.1.3/PKG-INFO
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: vbi
|
3
|
+
Version: 0.1.3
|
4
|
+
Summary: Virtual brain inference.
|
5
|
+
Author-email: Abolfazl Ziaeemehr <a.ziaeemehr@gmail.com>, Meysam Hashemi <meysam.hashemi@gmail.com>, Marmaduke Woodman <marmaduke.woodman@gmail.com>
|
6
|
+
License: MIT
|
7
|
+
Project-URL: homepage, https://ziaeemehr.github.io/vbi_paper/
|
8
|
+
Project-URL: repository, https://github.com/Ziaeemehr/vbi_paper
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
10
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
11
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
12
|
+
Classifier: Operating System :: OS Independent
|
13
|
+
Requires-Python: >=3.8
|
14
|
+
Description-Content-Type: text/markdown
|
15
|
+
License-File: LICENSE
|
16
|
+
Requires-Dist: wheel
|
17
|
+
Requires-Dist: numpy
|
18
|
+
Requires-Dist: scipy
|
19
|
+
Requires-Dist: numba
|
20
|
+
Requires-Dist: h5py
|
21
|
+
Requires-Dist: pandas
|
22
|
+
Requires-Dist: networkx
|
23
|
+
Requires-Dist: nbconvert
|
24
|
+
Requires-Dist: matplotlib
|
25
|
+
Requires-Dist: setuptools-scm
|
26
|
+
Requires-Dist: tqdm
|
27
|
+
Requires-Dist: sbi
|
28
|
+
Requires-Dist: torch
|
29
|
+
Requires-Dist: parameterized
|
30
|
+
Requires-Dist: scikit-learn
|
31
|
+
Requires-Dist: pycatch22
|
32
|
+
Requires-Dist: pytest
|
33
|
+
Requires-Dist: swig
|
34
|
+
Requires-Dist: rich
|
35
|
+
Provides-Extra: dev
|
36
|
+
Provides-Extra: docs
|
37
|
+
Requires-Dist: sphinx; extra == "docs"
|
38
|
+
Requires-Dist: numpydoc; extra == "docs"
|
39
|
+
Requires-Dist: nbformat; extra == "docs"
|
40
|
+
Requires-Dist: nbsphinx; extra == "docs"
|
41
|
+
Requires-Dist: cloud_sptheme; extra == "docs"
|
42
|
+
Requires-Dist: sphinx_bootstrap_theme; extra == "docs"
|
43
|
+
Provides-Extra: cu
|
44
|
+
Requires-Dist: cupy; extra == "cu"
|
45
|
+
Provides-Extra: all
|
46
|
+
Requires-Dist: pytest; extra == "all"
|
47
|
+
Requires-Dist: sphinx; extra == "all"
|
48
|
+
Requires-Dist: numpydoc; extra == "all"
|
49
|
+
Requires-Dist: nbformat; extra == "all"
|
50
|
+
Requires-Dist: nbsphinx; extra == "all"
|
51
|
+
Requires-Dist: cloud_sptheme; extra == "all"
|
52
|
+
Requires-Dist: sphinx_bootstrap_theme; extra == "all"
|
53
|
+
Requires-Dist: cupy; extra == "all"
|
54
|
+
Dynamic: license-file
|
55
|
+
|
56
|
+
[](https://github.com/ins-amu/vbi/actions/workflows/tests.yml)
|
57
|
+
[](https://vbi.readthedocs.io/latest/)
|
58
|
+
[](https://doi.org/10.5281/zenodo.14795543)
|
59
|
+
[](https://github.com/ins-amu/vbi/actions/workflows/docker-image.yml)
|
60
|
+
<!-- [](https://mybinder.org/v2/gh/ins-amu/vbi/main?labpath=docs/examples/intro.ipynb) -->
|
61
|
+
|
62
|
+
|
63
|
+
# VBI: Virtual Brain Inference
|
64
|
+
---
|
65
|
+
[Getting Started](https://github.com/ins-amu/vbi/tree/main/docs/examples) |
|
66
|
+
[Documentation](https://vbi.readthedocs.io/latest/) |
|
67
|
+
|
68
|
+
<p align="center">
|
69
|
+
<img src="https://github.com/Ziaeemehr/vbi_paper/blob/main/vbi_log.png" width="250">
|
70
|
+
</p>
|
71
|
+
|
72
|
+
|
73
|
+
## installation
|
74
|
+
|
75
|
+
```bash
|
76
|
+
conda env create --name vbi python=3.10
|
77
|
+
conda activate vbi
|
78
|
+
git clone https://github.com/ins-amu/vbi.git
|
79
|
+
cd vbi
|
80
|
+
pip install .
|
81
|
+
|
82
|
+
# pip install -e .[all,dev,docs]
|
83
|
+
```
|
84
|
+
|
85
|
+
## Using Docker
|
86
|
+
|
87
|
+
To use the Docker image, you can pull it from the GitHub Container Registry and run it as follows:
|
88
|
+
|
89
|
+
```bash
|
90
|
+
# Get it without building anything locally
|
91
|
+
# without GPU
|
92
|
+
docker run --rm -it -p 8888:8888 ghcr.io/ins-amu/vbi:main
|
93
|
+
|
94
|
+
# with GPU
|
95
|
+
docker run --gpus all --rm -it -p 8888:8888 ghcr.io/ins-amu/vbi:main
|
96
|
+
|
97
|
+
|
98
|
+
# or build it locally:
|
99
|
+
docker build -t vbi-project . # build
|
100
|
+
docker run --gpus all -it -p 8888:8888 vbi-project # use with gpu
|
101
|
+
|
102
|
+
```
|
103
|
+
|
104
|
+
- Quick check :
|
105
|
+
|
106
|
+
```python
|
107
|
+
|
108
|
+
import vbi
|
109
|
+
vbi.tests()
|
110
|
+
vbi.test_imports()
|
111
|
+
|
112
|
+
|
113
|
+
# Dependency Check
|
114
|
+
#
|
115
|
+
# Package Version Status
|
116
|
+
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
117
|
+
# vbi v0.1.3 ✅ Available
|
118
|
+
# numpy 1.24.4 ✅ Available
|
119
|
+
# scipy 1.10.1 ✅ Available
|
120
|
+
# matplotlib 3.7.5 ✅ Available
|
121
|
+
# sbi 0.22.0 ✅ Available
|
122
|
+
# torch 2.4.1+cu121 ✅ Available
|
123
|
+
# cupy 12.3.0 ✅ Available
|
124
|
+
#
|
125
|
+
# Torch GPU available: True
|
126
|
+
# Torch device count: 1
|
127
|
+
# Torch CUDA version: 12.1
|
128
|
+
# CuPy GPU available: True
|
129
|
+
# CuPy device count: 1
|
130
|
+
# CUDA Version: 11.8
|
131
|
+
# Device Name: NVIDIA RTX A5000
|
132
|
+
# Total Memory: 23.68 GB
|
133
|
+
# Compute Capability: 8.6
|
134
|
+
|
135
|
+
```
|
136
|
+
|
137
|
+
|
138
|
+
## Feedback and Contributions
|
139
|
+
|
140
|
+
We welcome contributions to the VBI project! If you have suggestions, bug reports, or feature requests, please open an issue on our [GitHub repository](https://github.com/ins-amu/vbi/issues). To contribute code, fork the repository, create a new branch for your feature or bugfix, and submit a pull request. Make sure to follow our coding standards and include tests for your changes. For detailed guidelines, please refer to our [CONTRIBUTING.md](https://github.com/ins-amu/vbi/blob/main/CONTRIBUTING.md) file. Thank you for helping us improve VBI!
|
141
|
+
|
142
|
+
|
143
|
+
## Citation
|
144
|
+
|
145
|
+
```bibtex
|
146
|
+
@article{VBI,
|
147
|
+
author = {Ziaeemehr, Abolfazl and Woodman, Marmaduke and Domide, Lia and Petkoski, Spase and Jirsa, Viktor and Hashemi, Meysam},
|
148
|
+
title = {Virtual Brain Inference (VBI): A flexible and integrative toolkit for efficient probabilistic inference on virtual brain models},
|
149
|
+
journal = {bioRxiv},
|
150
|
+
year = {2025},
|
151
|
+
doi = {10.1101/2025.01.21.633922},
|
152
|
+
url = {https://doi.org/10.1101/2025.01.21.633922},
|
153
|
+
abstract = {Network neuroscience has proven essential for understanding the principles and mechanisms underlying complex brain (dys)function and cognition. In this context, whole-brain network modeling--also known as virtual brain modeling--combines computational models of brain dynamics (placed at each network node) with individual brain imaging data (to coordinate and connect the nodes), advancing our understanding of the complex dynamics of the brain and its neurobiological underpinnings. However, there remains a critical need for automated model inversion tools to estimate control (bifurcation) parameters at large scales and across neuroimaging modalities, given their varying spatio-temporal resolutions. This study aims to address this gap by introducing a flexible and integrative toolkit for efficient Bayesian inference on virtual brain models, called Virtual Brain Inference (VBI). This open-source toolkit provides fast simulations, taxonomy of feature extraction, efficient data storage and loading, and probabilistic machine learning algorithms, enabling biophysically interpretable inference from non-invasive and invasive recordings. Through in-silico testing, we demonstrate the accuracy and reliability of inference for commonly used whole-brain network models and their associated neuroimaging data. VBI shows potential to improve hypothesis evaluation in network neuroscience through uncertainty quantification, and contribute to advances in precision medicine by enhancing the predictive power of virtual brain models.}
|
154
|
+
}
|
155
|
+
```
|
156
|
+
|
157
|
+
This research has received funding from:
|
158
|
+
|
159
|
+
- EU's Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreements:
|
160
|
+
- No. 101147319 (EBRAINS 2.0 Project)
|
161
|
+
- No. 101137289 (Virtual Brain Twin Project)
|
162
|
+
- No. 101057429 (project environMENTAL)
|
163
|
+
- Government grant managed by the Agence Nationale de la Recherche:
|
164
|
+
- Reference ANR-22-PESN-0012 (France 2030 program)
|
165
|
+
|
166
|
+
The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
|