README.rst
fcb78201
 .. summary-start
 
5e3edf47
 |logo| adaptive
 ===============
fcb78201
 
5e3edf47
 |PyPI| |Conda| |Downloads| |Pipeline status| |DOI| |Binder| |Gitter|
0aac63b9
 |Documentation| |Coverage| |GitHub|
fcb78201
 
65ac7d30
   *Adaptive*: parallel active learning of mathematical functions.
fcb78201
 
eef11f0b
 ``adaptive`` is an open-source Python library designed to
fcb78201
 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.
 
ed2f8852
 Run the ``adaptive`` example notebook `live on
ad54a7ef
 Binder <https://mybinder.org/v2/gh/python-adaptive/adaptive/master?filepath=example-notebook.ipynb>`_
ed2f8852
 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>`__.
fcb78201
 
 .. summary-end
 
 **WARNING: adaptive is still in a beta development stage**
 
b1ebe92e
 .. not-in-documentation-start
fcb78201
 
 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:
 
 - ``Learner1D``, for 1D functions ``f: ℝ → ℝ^N``,
 - ``Learner2D``, for 2D functions ``f: ℝ^2 → ℝ^N``,
 - ``LearnerND``, for ND functions ``f: ℝ^N → ℝ^M``,
 - ``AverageLearner``, For stochastic functions where you want to
   average the result over many evaluations,
 - ``IntegratorLearner``, for
   when you want to intergrate a 1D function ``f: ℝ → ℝ``,
 - ``BalancingLearner``, for when you want to run several learners at once,
   selecting the “best” one each time you get more points.
 
 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
 
05727f98
   <img src="https://user-images.githubusercontent.com/6897215/38739170-6ac7c014-3f34-11e8-9e8f-93b3a3a3d61b.gif" width='20%'> </img> <img src="https://user-images.githubusercontent.com/6897215/35219611-ac8b2122-ff73-11e7-9332-adffab64a8ce.gif" width='40%'> </img> <img src="https://user-images.githubusercontent.com/6897215/47256441-d6d53700-d480-11e8-8224-d1cc49dbdcf5.gif" width='20%'> </img>
fcb78201
 
b1ebe92e
 .. not-in-documentation-end
fcb78201
 
 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.
 
8462acb1
 We implement several other checks in order to maintain a consistent code style. We do this using `pre-commit <https://pre-commit.com>`_, execute
8e4c4593
 
 .. code:: bash
 
     pre-commit install
 
 in the repository.
 
4f7ce3c1
 Citing
 ------
 
 If you used Adaptive in a scientific work, please cite it as follows.
 
65ac7d30
 .. code:: bib
4f7ce3c1
 
     @misc{Nijholt2019,
       doi = {10.5281/zenodo.1182437},
       author = {Bas Nijholt and Joseph Weston and Jorn Hoofwijk and Anton Akhmerov},
       title = {\textit{Adaptive}: parallel active learning of mathematical functions},
       publisher = {Zenodo},
       year = {2019}
     }
 
fcb78201
 Credits
 -------
 
 We would like to give credits to the following people:
 
 - Pedro Gonnet for his implementation of `CQUAD <https://www.gnu.org/software/gsl/manual/html_node/CQUAD-doubly_002dadaptive-integration.html>`_,
   “Algorithm 4” as described in “Increasing the Reliability of Adaptive
   Quadrature Using Explicit Interpolants”, P. Gonnet, ACM Transactions on
   Mathematical Software, 37 (3), art. no. 26, 2010.
 - Pauli Virtanen for his ``AdaptiveTriSampling`` script (no longer
   available online since SciPy Central went down) which served as
5e3edf47
   inspiration for the `~adaptive.Learner2D`.
 
 .. credits-end
fcb78201
 
 For general discussion, we have a `Gitter chat
 channel <https://gitter.im/python-adaptive/adaptive>`_. If you find any
cbfe6144
 bugs or have any feature suggestions please file a GitHub
 `issue <https://github.com/python-adaptive/adaptive/issues/new>`_
 or submit a `pull
 request <https://github.com/python-adaptive/adaptive/pulls>`_.
fcb78201
 
 .. references-start
5e3edf47
 .. |logo| image:: https://adaptive.readthedocs.io/en/latest/_static/logo.png
fcb78201
 .. |PyPI| image:: https://img.shields.io/pypi/v/adaptive.svg
    :target: https://pypi.python.org/pypi/adaptive
5e3edf47
 .. |Conda| image:: https://img.shields.io/badge/install%20with-conda-green.svg
fcb78201
    :target: https://anaconda.org/conda-forge/adaptive
5e3edf47
 .. |Downloads| image:: https://img.shields.io/conda/dn/conda-forge/adaptive.svg
fcb78201
    :target: https://anaconda.org/conda-forge/adaptive
aa045cc1
 .. |Pipeline status| image:: https://dev.azure.com/python-adaptive/adaptive/_apis/build/status/python-adaptive.adaptive?branchName=master
    :target: https://dev.azure.com/python-adaptive/adaptive/_build/latest?definitionId=6?branchName=master
b5cccb04
 .. |DOI| image:: https://img.shields.io/badge/doi-10.5281%2Fzenodo.1182437-blue.svg
    :target: https://doi.org/10.5281/zenodo.1182437
fcb78201
 .. |Binder| image:: https://mybinder.org/badge.svg
ad54a7ef
    :target: https://mybinder.org/v2/gh/python-adaptive/adaptive/master?filepath=example-notebook.ipynb
5e3edf47
 .. |Gitter| image:: https://img.shields.io/gitter/room/nwjs/nw.js.svg
fcb78201
    :target: https://gitter.im/python-adaptive/adaptive
5e3edf47
 .. |Documentation| image:: https://readthedocs.org/projects/adaptive/badge/?version=latest
ed2f8852
    :target: https://adaptive.readthedocs.io/en/latest/?badge=latest
5e3edf47
 .. |GitHub| image:: https://img.shields.io/github/stars/python-adaptive/adaptive.svg?style=social
    :target: https://github.com/python-adaptive/adaptive/stargazers
0aac63b9
 .. |Coverage| image:: https://img.shields.io/codecov/c/github/python-adaptive/adaptive
    :target: https://codecov.io/gh/python-adaptive/adaptive
fcb78201
 .. references-end