jexplore.steps.de ================= .. py:module:: jexplore.steps.de .. autoapi-nested-parse:: This module define the class for a MH step based on Differential evolution proposal. Classes ------- .. autoapisummary:: jexplore.steps.de.DEStep Module Contents --------------- .. py:class:: DEStep[Tepoch: jexplore.sampling.EpochMH, Tstate: jexplore.sampling.StateMH, Tsampling: jexplore.sampling.SamplingMH](gamma = 2.38, ngroups = 2, permute = False) Bases: :py:obj:`jexplore.steps.colored.ColoredSC`\ [\ :py:obj:`Tepoch`\ , :py:obj:`Tstate`\ , :py:obj:`Tsampling`\ ] Class implementing a Differential evolution step :param gamma: :math:`\gamma` scale parameter :param ngroups: number of groups. Default 2. :param permute: if true walkers are permuted at each iteration. .. py:attribute:: gamma :type: float DE proposal :math:`\gamma` parameter .. py:attribute:: sigma :type: jax.Array gamma distribution :math:`\sigma = \frac{\gamma}{2\sqrt{D}}` .. py:attribute:: npart :type: int :value: 2 number of partners needed to build the proposal .. py:method:: build(epoch) Step initialisation method. It extends :py:attr:`jexplore.steps.colored.Colored.build` by simply adding the computation of the :math:`\sigma` of the :math:`\gamma` distribution. :param epoch: current epoch. .. py:method:: sample_gamma(key, state) Sample :math:`\gamma` from normal distribution :param key: PRNG key :param size: output size :return: samples .. py:method:: proposal(key, state, group, cgroup) Propose a new state according to the DE proposal algorithm. :param key: PRNG key :param state: current state :return: new state and the boolean mask of the chains modified by the step.