Skip to content

Commit

Permalink
Example notebooks (#50)
Browse files Browse the repository at this point in the history
+ minor bug fix
  • Loading branch information
dirmeier authored Dec 13, 2024
1 parent cc6fd38 commit 8c2f1b2
Show file tree
Hide file tree
Showing 22 changed files with 5,984 additions and 9 deletions.
7 changes: 7 additions & 0 deletions manuscript+supplement/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
venv/
venv/*

figs/
figs/*

eeg_data.pkl
47 changes: 47 additions & 0 deletions manuscript+supplement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Reproducing results of the `sbijax` manuscript

In order to reproduce the results of the paper, please follow the steps below.

Install a new Python3.11 virtual environment and activate it using:

```shell
python3.11 -m venv venv
source venv/bin/activate
```

Install `sbijax` and all dependencies using:
```shell
pip install -r requirements.txt
```

## Usage with Jupyter notebooks

For each section that contains code and figures, we provide a separate Jupyter notebook.
All notebooks contain the results and figures shown in the main manuscript.

To run all experiments using Jupyter, first install a Jupyter kernel:
```shell
python -m ipykernel install --name sbi-dev --user
```

Then call
```shell
cd experimental_code
jupyter lab
```

This opens Jupyter on your web browser. You can now run any of the three notebooks.

## Usage with Python files

For each section that contains code and figures, we also provide separate Python files.

To execute each and reproduce the results of a section, call:
```shell
cd experimental_code/scripts
python chp3-the_sbi_package.py
python chp4-examples.py
python chpx-appendix.py
```

Calling a Python script creates files in a folder called `fig`.
Loading

0 comments on commit 8c2f1b2

Please sign in to comment.