To reproduce the figures from the paper, please use define_experiment.ipynb in the experiments folder.
All experiments have a definition for the data-model and problem types considered. The choice of the sweep parameters has to be customised.
Once you've created an experiment.json file and you would like to run the experiment from the command line instead of the jupyter notebook, use:
mpiexec -n 5 python sweep/run_sweep.py --file experiment.jsonAlternatively, in a cluster environment, it is possible to use a run.sh file. There's an example in experiments/run.sh.
The experiments on real data have been performed in the pca_experiments.ipynb notebook.
Install mpi using brew
brew install mpichInstall an environment for execution:
pip install uv
uv venv --python 3.11
source .venv/bin/activate
uv pip install -r pyproject.tomlInstall this package
uv pip install .Build brentq.c:
gcc -shared -o numerics/brentq.so numerics/brentq.cInstall mpi using brew
brew install mpichInstall an environment for development:
pip install uv
uv venv --python 3.11
source .venv/bin/activate
uv pip install -r pyproject.toml --extra devInstall this package in editable mode
uv pip install -e .Build brentq.c:
gcc -shared -o numerics/brentq.so numerics/brentq.cInstall a pre-commit hook for ruff
pre-commit installRun the tests like this to see logging output
pytest -o log_cli=true -o log_cli_level=INFOIf you work with vs code, add this to your .vscode/settings.json file in your workspace for the notebooks to resolve your python path correctly:
"python.analysis.extraPaths": [
"${workspaceFolder}"
]