- Notifications
You must be signed in to change notification settings - Fork62
📈 Adaptive: parallel active learning of mathematical functions
License
python-adaptive/adaptive
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Tools for adaptive parallel sampling of mathematical functions.
adaptive is an open-source Python library designed tomake adaptive parallel function evaluation simple. Withadaptive youjust 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 canevaluate functions on a computing cluster, live-plot the data as itreturns, and fine-tune the adaptive sampling algorithm.
Run theadaptive example notebooklive onBinderto see examples of how to useadaptive or visit thetutorial on Read the Docs.
WARNING: adaptive is still in a beta development stage
The core concept inadaptive is that of alearner. Alearnersamples a function at the best places in its parameter space to getmaximum “information” about the function. As it evaluates the functionat more and more points in the parameter space, it gets a better idea ofwhere the best places are to sample next.
Of course, what qualifies as the “best places” will depend on yourapplication 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 functionsf: ℝ → ℝ^N,Learner2D, for 2D functionsf: ℝ^2 → ℝ^N,LearnerND, for ND functionsf: ℝ^N → ℝ^M,AverageLearner, For stochastic functions where you want toaverage the result over many evaluations,IntegratorLearner, forwhen you want to intergrate a 1D functionf: ℝ → ℝ,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 forrunning the sampling across several cores and even several machines,with built-in support forconcurrent.futures,ipyparallel anddistributed.
adaptive works with Python 3.6 and higher on Linux, Windows, or Mac,and provides optional extensions for working with the Jupyter/IPythonNotebook.
The recommended way to install adaptive is usingconda:
conda install -c conda-forge adaptive
adaptive is also available on PyPI:
pip install adaptive[notebook]
The[notebook] above will also install the optional dependencies forrunningadaptive inside a Jupyter notebook.
Clone the repository and runsetup.py develop to add a link to thecloned repo into your Python path:
git clone git@github.com:python-adaptive/adaptive.gitcd adaptivepython3 setup.py developWe highly recommend using a Conda environment or a virtualenv to managethe versions of your installed packages while working onadaptive.
In order to not pollute the history with the output of the notebooks,please setup the git filter by executing
python ipynb_filter.py
in the repository.
We implement several other checks in order to maintain a consistent code style. We do this usingpre-commit, execute
pre-commit install
in the repository.
We would like to give credits to the following people:
- Pedro Gonnet for his implementation ofCQUAD,“Algorithm 4” as described in “Increasing the Reliability of AdaptiveQuadrature Using Explicit Interpolants”, P. Gonnet, ACM Transactions onMathematical Software, 37 (3), art. no. 26, 2010.
- Pauli Virtanen for his
AdaptiveTriSamplingscript (no longeravailable online since SciPy Central went down) which served asinspiration for the ~adaptive.Learner2D.
For general discussion, we have aGitter chatchannel. If you find anybugs or have any feature suggestions please file a GitHubissueor submit apullrequest.
About
📈 Adaptive: parallel active learning of mathematical functions
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.



