jexplore.steps.direct ===================== .. py:module:: jexplore.steps.direct .. autoapi-nested-parse:: This module defines single chain Metropolis-Hastings steps with direct proposals: i.e. proposals proposing points by sampling a given distribution. Classes ------- .. autoapisummary:: jexplore.steps.direct.Direct jexplore.steps.direct.Uniform jexplore.steps.direct.Gaussian Module Contents --------------- .. py:class:: Direct(dist, mask = None, **opts) Bases: :py:obj:`jexplore.steps.mh.AllChains` Class implementing all chain metropoling hasting step with a proposal directly proposing points sampling from a distribution :param dist: distribution. :param \**opts: options to be passed to the distribution creator. .. py:attribute:: dist :type: Type[jexplore.tools.distributions.Distr] distribution class .. py:attribute:: opts :type: dict distribution creator options .. py:attribute:: epoch_dist :type: jexplore.tools.distributions.Distr distribution instance for the epoch .. py:method:: build(epoch) Step epoch initialisation method. This extends method :py:attr:`jexplore.steps.step.Step.build` by instantiating the ditribution object for this epoch. `epoch` and `sampling` attributes. :param epoch: current epoch. .. py:method:: proposal(key, state) Propose a point by sampling this class distribution. :param key: PRNG key :param state: current state :return: new state and the boolean mask of the chains modified by the step. .. py:class:: Uniform(mask = None, minval = 0.0, maxval = 1.0) Bases: :py:obj:`Direct` Sampling from a uniform distribution in a box. :param mask: proposal dimensions mask (default all space) :param minval: minimum (inclusive) value broadcast-compatible with shape for the range (default 0). :param maxval: maximum (exclusive) value broadcast-compatible with shape for the range (default 1). .. py:class:: Gaussian(mask = None) Bases: :py:obj:`Direct` Sampling from a Gaussian distribution (to be completed). :param mask: proposal dimensions mask (default all space)