adaptive.BaseLearner#
- class adaptive.learner.BaseLearner(*args, **kwargs)[source]#
Bases:
object
Base class for algorithms for learning a function ‘f: X → Y’.
- function#
The function to learn. A subclass of BaseLearner might modify the user’s supplied function.
- Type
callable: X → Y
- data#
function evaluated at certain points.
- Type
dict: X → Y
Notes
Subclasses may define a
plot
method that takes no parameters and returns a holoviews plot.- copy_from(other)[source]#
Copy over the data from another learner.
- Parameters
other (BaseLearner object) – The learner from which the data is copied.
- abstract 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).
- tell(x, y)[source]#
Tell the learner about a single value.
- Parameters
x (A value from the function domain) –
y (A value from the function image) –