Metadata-Version: 2.1
Name: nnbma
Version: 1.0.2
Summary: Neural network-based model approximation (nnbma)
Home-page: https://github.com/einigl/ism-model-nn-approximation
Keywords: machine learning,neural network
Author: Lucas Einig
Requires-Python: >=3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: jupyter (>=1.0.0,<2.0.0)
Requires-Dist: matplotlib (>=3.6.2,<4.0.0)
Requires-Dist: more-itertools (>=10.0.0,<11.0.0)
Requires-Dist: numpy (>=1.20.2,<2.0.0)
Requires-Dist: pandas (>=1.3.4)
Requires-Dist: torch (>=2.0.0,!=2.0.1,!=2.1.0)
Requires-Dist: tqdm (>=4.62.3,<5.0.0)
Project-URL: Bug Tracker, https://github.com/einigl/ism-model-nn-approximation/issues
Project-URL: Documentation, https://ism-model-nn-approximation.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/einigl/ism-model-nn-approximation
Description-Content-Type: text/markdown

# Neural network-based model approximation (nnbma)

[![PyPI version](https://badge.fury.io/py/nnbma.svg)](https://badge.fury.io/py/nnbma)
[![Documentation Status](https://readthedocs.org/projects/ism-model-nn-approximation/badge/?version=latest)](https://ism-model-nn-approximation.readthedocs.io/en/latest/?badge=latest)
![test coverage](./docs/coverage.svg)

Neural network-based model approximation `nnbma` is a Python package that handle the creation and the training of neural networks to approximate numerical models.
In \[1\], it was designed and used to derive an approximation of the Meudon PDR code, a complex astrophysical numerical code.

## Installation

To build your own neural network for your numerical model, we recommend installing the package.
The package can be installed with `pip`:

```shell
pip install nnbma
```

To reproduce the results from \[1\], clone the repo with

```shell
git clone git@github.com:einigl/ism-model-nn-approximation.git
```

Alternatively, you can also download a zip file.

This package relies on _PyTorch_ to build neural networks.
It enables to evaluate any neural network, its gradient, and its Hessian matrix efficiently.

If you do not have a Python environment compatible with the above dependencies, we advise you to create a specific conda environment to use this code (<https://conda.io/projects/conda/en/latest/user-guide/>).

## References

\[1\] Palud, P. & Einig, L. & Le Petit, F. & Bron, E. & Chainais, P. & Chanussot, J. & Pety, J. & Thouvenin, P.-A. & Languignon, D. & Beslić, I. & G. Santa-Maria, M. & Orkisz, J.H. & Ségal, L. & Zakardjian, A. & Bardeau, S. & Gerin, M. & Goicoechea, J.R. & Gratier, P. & Guzman, V. (2023). Neural network-based emulation of interstellar medium models. Astronomy & Astrophysics. 10.1051/0004-6361/202347074.

