Skip to content

Adaptive: Parallel Active Learning of Mathematical Functions

Tests PyPI Conda Python Documentation Coverage Downloads DOI Binder

adaptive is an open-source Python library for adaptive parallel function evaluation. You supply a function and its bounds, and adaptive evaluates it at the "best" points in parameter space, instead of at all points of a dense grid. With a few lines of code you can run the evaluations on a computing cluster, live-plot the data as it comes in, and fine-tune the sampling algorithm.

adaptive works best when each function evaluation takes at least ≈50 ms, because picking the next points has some overhead. It is meant for functions of a few parameters: with more dimensions, LearnerND quickly becomes slower and less effective.

Try the example notebook on Binder or read the tutorial.

With the same number of points, adaptive sampling resolves features that a homogeneous grid misses:

Learner1D: homogeneous grid versus adaptive sampling of a sharp peak Learner2D: homogeneous grid versus adaptive triangulation of a ring LearnerND: sampled points concentrate on a spherical shell

Start the tutorial See the examples API reference