pyuncertainnumber.propagation.helper ==================================== .. py:module:: pyuncertainnumber.propagation.helper Classes ------- .. autoapisummary:: pyuncertainnumber.propagation.helper.EpistemicDomain Module Contents --------------- .. py:class:: 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. :param 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. .. seealso:: :class:`pyuncertainnumber.src.pyuncertainnumber.opt.bo` : Bayesian optimisation class. :class:`pyuncertainnumber.src.pyuncertainnumber.opt.ga` : Genetic algorithm class. .. rubric:: 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) .. py:method:: lhs_sampling(n_samples: int) perform lhs sampling on the epistemic space .. py:method:: lhs_plus_endpoints(n_samples: int) perform lhs sampling on the epistemic space and add endpoints .. py:method:: bound_rep() return the bounds (vec or matrix) of the epistemic space .. py:method:: toOptBounds(method: str) convert the epistemic space to bounds for the optimizer :param method: the optimization method to use, e.g. 'BayesOpt', 'GA' :type method: str :returns: the bounds of the design varibale used for the optimisation method .. py:method:: to_GA_varBounds() -> numpy.ndarray convert the epistemic space to bounds for the genetic algorithm optimizer .. py:method:: to_BayesOptBounds(func_signature='vectorisation') -> dict convert the epistemic space to bounds for the Bayesian optimisation optimizer