jexplore.steps.modsel.model_switch ================================== .. py:module:: jexplore.steps.modsel.model_switch .. autoapi-nested-parse:: This module defines the classes for Model Selection models switching steps. Classes ------- .. autoapisummary:: jexplore.steps.modsel.model_switch.DrawPseudo jexplore.steps.modsel.model_switch.DrawModel Module Contents --------------- .. py:class:: DrawPseudo[Tepoch: jexplore.sampling.EpochMS, Tstate: jexplore.sampling.StateMS, Tsampling: jexplore.sampling.SamplingMS] Bases: :py:obj:`jexplore.steps.step.Step`\ [\ :py:obj:`Tepoch`\ , :py:obj:`Tstate`\ , :py:obj:`Tsampling`\ ] Draws model pseudo prior samples for each chain .. py:attribute:: draw_funcs :type: list static list of pseudo prior rowing function for each model .. py:method:: build(epoch) Epoch initialisation method. :param epoch: current epoch. .. py:method:: step(key, state) Pseudo drawing step :param key: PRNG key :param state: current state :return: new state and the boolean mask of the chains modified by the step. .. py:class:: DrawModel[Tepoch: jexplore.sampling.EpochMS, Tstate: jexplore.sampling.StateMS, Tsampling: jexplore.sampling.SamplingMS](reorder = True, draw_pseudo = True) Bases: :py:obj:`jexplore.steps.mh.MHStep`\ [\ :py:obj:`Tepoch`\ , :py:obj:`Tstate`\ , :py:obj:`Tsampling`\ ] Draw models for each chain from a categorical which log weights are the sum of log likelihood, log priori and log pseudo prior. :param reorder: reorder chains by model (temp by temp) after running the model draw. :param draw_pseudo: draw from pseudo prior before drawing the models. .. py:attribute:: reorder :type: bool Reorder the chain by model (and temp) after drawing models .. py:attribute:: draw_pseudo :type: bool Draw pseudo prior before drawing models .. py:method:: build(epoch) Step epoch initialisation method. Extend :py:attr:`jexplore.steps.step.Step.build` by populating the `betas` attribute. :param epoch: current epoch. .. py:method:: step(key, state) Model drawing step :param key: PRNG key :param state: current state :return: new state and the boolean mask of the chains modified by the step.