BayesOptSamplingEngine

class aixd.sampler.engines.BayesOptSamplingEngine(features: List[str], kind: str = 'ucb', kappa: float = 2.576, xi: float = 0.9, kappa_decay: float = 0.9, kappa_decay_delay: int = 0, prior_dist_weight: float = 0.01, seed: int = 1730710435, **kwargs)[source]

Bases: AdaptiveSamplingEngine

Samples in [0, 1] according to a Bayesian Optimisation strategy, where the objectives are maximised. Based on the python bayesian-optimization package: fmfn/BayesianOptimization

Parameters:
  • kind ({‘ucb’, ‘ei’, ‘poi’}) –

    • ‘ucb’ stands for the Upper Confidence Bounds method

    • ‘ei’ is the Expected Improvement method

    • ‘poi’ is the Probability Of Improvement criterion.

  • kappa (float, optional, default=2.576) – Parameter to indicate how closed are the next parameters sampled. Higher value = favors spaces that are least explored. Lower value = favors spaces where the regression function is the highest.

  • xi (float, optional, default=0.0)

  • kappa_decay (float, optional, default=1) – kappa is multiplied by this factor every iteration.

  • kappa_decay_delay (int, optional, default=0) – Number of iterations that must have passed before applying the decay to kappa.

  • prior_dist_weight (float, optional, default=0.0001) – The weight to give to the prior distribution. If higher, more weight will be put on respecting prior distribution. If lower, optimising the objectives is more important.

Methods

reset_states

Reset the state of the sampler to start the Bayesian sampling from scratch

sample

Performs the sampling.

update

Updates the utility function by subtracting a large number from the performance of invalid samples.

Inherited Methods

deserialise

Allows to initialise a SamplingEngine by passing the identifier string along with with any specific arguments.