adaptive.AverageLearner¶
-
class
adaptive.
AverageLearner
(*args, **kwargs)[source]¶ Bases:
adaptive.learner.base_learner.BaseLearner
A naive implementation of adaptive computing of averages.
The learned function must depend on an integer input variable that represents the source of randomness.
- Parameters
-
loss
(real=True, *, n=None)[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
mean
¶ The average of all values in data.
-
property
n_requested
¶
-
plot
()[source]¶ Returns a histogram of the evaluated data.
- Returns
A histogram of the evaluated data.
- Return type
-
property
std
¶ The corrected sample standard deviation of the values in data.