pyuncertainnumber.propagation.helper¶
Classes¶
Representation of the epistemic space which are indeed bounds of each dimension |
Module Contents¶
- class pyuncertainnumber.propagation.helper.EpistemicDomain(*vars: pyuncertainnumber.pba.intervals.Interval)¶
Representation of the epistemic space which are indeed bounds of each dimension
This class provides a set of handy functions to work with epistemic uncertainty in the form of bounds. It will be useful for tasks such as propagation or optimization where epistemic uncertainty is involved.
- Parameters:
vars – a set of Interval variables
Tip
Recommended to use for optimisation tasks where the design bounds can be quickly specified with the
toOptBounds()method.See also
pyuncertainnumber.src.pyuncertainnumber.opt.bo: Bayesian optimisation class.pyuncertainnumber.src.pyuncertainnumber.opt.ga: Genetic algorithm class.Example
>>> from pyuncertainnumber import pba >>> e = EpistemicDomain(pba.I(-1, 3), pba.I(5, 9))
>>> # convert the epistemic space to bounds for the optimizer >>> e.toOptBounds(method='GA') # `varbound` for genetic algorithm >>> e.toOptBounds(method='BO') # `xc_bounds` for Bayesian optimisation
>>> # perform lhs sampling on the epistemic space >>> sample = e.lhs_sampling(1000)
- lhs_sampling(n_samples: int)¶
perform lhs sampling on the epistemic space
- lhs_plus_endpoints(n_samples: int)¶
perform lhs sampling on the epistemic space and add endpoints
- bound_rep()¶
return the bounds (vec or matrix) of the epistemic space
- toOptBounds(method: str)¶
convert the epistemic space to bounds for the optimizer
- Parameters:
method (str) – the optimization method to use, e.g. ‘BayesOpt’, ‘GA’
- Returns:
the bounds of the design varibale used for the optimisation method
- to_GA_varBounds() numpy.ndarray¶
convert the epistemic space to bounds for the genetic algorithm optimizer
- to_BayesOptBounds(func_signature='vectorisation') dict¶
convert the epistemic space to bounds for the Bayesian optimisation optimizer