basnijholt / adaptive

:chart_with_upwards_trend: Tools for adaptive and parallel samping of mathematical functions
http://adaptive.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

.. summary-start

|logo| adaptive

|PyPI| |Conda| |Downloads| |Pipeline status| |DOI| |Binder| |Gitter| |Documentation| |GitHub|

Tools for adaptive parallel sampling of mathematical functions.

adaptive is an open-source Python library designed to make adaptive parallel function evaluation simple. With adaptive you just supply a function with its bounds, and it will be evaluated at the “best” points in parameter space. With just a few lines of code you can evaluate functions on a computing cluster, live-plot the data as it returns, and fine-tune the adaptive sampling algorithm.

Run the adaptive example notebook live on Binder <https://mybinder.org/v2/gh/python-adaptive/adaptive/master?filepath=learner.ipynb>_ to see examples of how to use adaptive or visit the tutorial on Read the Docs <https://adaptive.readthedocs.io/en/latest/tutorial/tutorial.html>__.

.. summary-end

WARNING: adaptive is still in a beta development stage

.. not-in-documentation-start

Implemented algorithms

The core concept in adaptive is that of a learner. A learner samples a function at the best places in its parameter space to get maximum “information” about the function. As it evaluates the function at more and more points in the parameter space, it gets a better idea of where the best places are to sample next.

Of course, what qualifies as the “best places” will depend on your application domain! adaptive makes some reasonable default choices, but the details of the adaptive sampling are completely customizable.

The following learners are implemented:

In addition to the learners, adaptive also provides primitives for running the sampling across several cores and even several machines, with built-in support for concurrent.futures <https://docs.python.org/3/library/concurrent.futures.html>, ipyparallel <https://ipyparallel.readthedocs.io/en/latest/> and distributed <https://distributed.readthedocs.io/en/latest/>_.

Examples

.. raw:: html

.. not-in-documentation-end

Installation

adaptive works with Python 3.6 and higher on Linux, Windows, or Mac, and provides optional extensions for working with the Jupyter/IPython Notebook.

The recommended way to install adaptive is using conda:

.. code:: bash

conda install -c conda-forge adaptive

adaptive is also available on PyPI:

.. code:: bash

pip install adaptive[notebook]

The [notebook] above will also install the optional dependencies for running adaptive inside a Jupyter notebook.

Development

Clone the repository and run setup.py develop to add a link to the cloned repo into your Python path:

.. code:: bash

git clone git@github.com:python-adaptive/adaptive.git
cd adaptive
python3 setup.py develop

We highly recommend using a Conda environment or a virtualenv to manage the versions of your installed packages while working on adaptive.

In order to not pollute the history with the output of the notebooks, please setup the git filter by executing

.. code:: bash

python ipynb_filter.py

in the repository.

Credits

We would like to give credits to the following people:

.. credits-end

For general discussion, we have a Gitter chat channel <https://gitter.im/python-adaptive/adaptive>. If you find any bugs or have any feature suggestions please file a GitLab issue <https://gitlab.kwant-project.org/qt/adaptive/issues/new?issue> or submit a merge request <https://gitlab.kwant-project.org/qt/adaptive/merge_requests>_.

.. references-start .. |logo| image:: https://adaptive.readthedocs.io/en/latest/_static/logo.png .. |PyPI| image:: https://img.shields.io/pypi/v/adaptive.svg :target: https://pypi.python.org/pypi/adaptive .. |Conda| image:: https://img.shields.io/badge/install%20with-conda-green.svg :target: https://anaconda.org/conda-forge/adaptive .. |Downloads| image:: https://img.shields.io/conda/dn/conda-forge/adaptive.svg :target: https://anaconda.org/conda-forge/adaptive .. |Pipeline status| image:: https://gitlab.kwant-project.org/qt/adaptive/badges/master/pipeline.svg :target: https://gitlab.kwant-project.org/qt/adaptive/pipelines .. |DOI| image:: https://img.shields.io/badge/doi-10.5281%2Fzenodo.1182437-blue.svg :target: https://doi.org/10.5281/zenodo.1182437 .. |Binder| image:: https://mybinder.org/badge.svg :target: https://mybinder.org/v2/gh/python-adaptive/adaptive/master?filepath=learner.ipynb .. |Gitter| image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg :target: https://gitter.im/python-adaptive/adaptive .. |Documentation| image:: https://readthedocs.org/projects/adaptive/badge/?version=latest :target: https://adaptive.readthedocs.io/en/latest/?badge=latest .. |GitHub| image:: https://img.shields.io/github/stars/python-adaptive/adaptive.svg?style=social :target: https://github.com/python-adaptive/adaptive/stargazers .. references-end