Skip to content

Commit

Permalink
Update examples readmes and add citation (#38)
Browse files Browse the repository at this point in the history
* Update examples readmes

* Add citation
  • Loading branch information
SamDuffield authored Jul 22, 2024
1 parent ccd6b73 commit 2a43ef6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,14 @@ plt.show()
</p>


# Citation
If you use `thermox` in your research, please cite the library using the following BibTeX entry:

```bibtex
@misc{duffield2024thermox,
title={thermox: Exact OU processes with JAX},
author={Duffield, Samuel and Donatella, Kaelan and Melanson, Denis},
howpublished={\url{https://github.com/normal-computing/thermox}},
year={2024}
}
```
8 changes: 6 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Examples

You will find two Jupyter notebooks in this folder:
You will find three Jupyter notebooks in this folder:

- `associative_scan.ipynb` plots the speedup of the associative scan algorithm implemented in `thermox` using a GPU.
- `diffrax_comparison.ipynb` runs a simple OU process using `thermox` and [`diffrax`](https://github.com/patrick-kidger/diffrax) and compares runtimes (showing a large benefit from using `thermox` for long simulation times)
- `thermodynamic_linear_algebra.ipynb` is a small tutorial on how to use functions from the `thermox.linalg` module.
- `thermodynamic_linear_algebra.ipynb` is a small tutorial on how to use functions from the `thermox.linalg` module.

Additionally the `matrix_exponentials` folder contains code for reproducing the simulations
in the [thermodynamic matrix exponentials paper](https://arxiv.org/abs/2311.12759).
17 changes: 17 additions & 0 deletions examples/matrix_exponentials/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Thermodynamic Matrix Exponentials Simulations

This folder contains code to replicate the convergence time simulations in the
[thermodynamic matrix exponentials paper](https://arxiv.org/abs/2311.12759).

The script `run.py` contains the code to run the simulations and can be executed with
e.g. the following command from the root of the repository:
```bash
PYTHONPATH=. python examples/matrix_exponentials/run.py --n_repeats=10 --matrix_type=orthogonal --alpha=1.1
```
where `--matrix_type` represents a function in `matrix_generation.py`.

The script `plot.py` contains the code to plot the results of the simulations and can be executed with e.g. the following command from the root of the repository:
```bash
PYTHONPATH=. python examples/matrix_exponentials/plot.py --save_dir=examples/matrix_exponentials/results_orthogonal.pkl
```

0 comments on commit 2a43ef6

Please sign in to comment.