adaptive.SequenceLearner¶
-
class
adaptive.
SequenceLearner
(*args, **kwargs)[source]¶ Bases:
adaptive.learner.base_learner.BaseLearner
A learner that will learn a sequence. It simply returns the points in the provided sequence when asked.
This is useful when your problem cannot be formulated in terms of another adaptive learner, but you still want to use Adaptive’s routines to run, save, and plot.
- Parameters
function (callable) – The function to learn. Must take a single element sequence.
sequence (sequence) – The sequence to learn.
Notes
From primitive tests, the
SequenceLearner
appears to have a similar performance to ipyparallelsload_balanced_view().map
. With the added benefit of having results in the local kernel already.-
loss
(real=True)[source]¶ Return the loss for the current state of the learner.
- Parameters
real (bool, default: True) – If False, return the “expected” loss, i.e. the loss including the as-yet unevaluated points (possibly by interpolation).
-
property
npoints
¶