leaspy.algo.algo_with_samplers ============================== .. py:module:: leaspy.algo.algo_with_samplers Classes ------- .. autoapisummary:: leaspy.algo.algo_with_samplers.AlgorithmWithSamplersMixin Module Contents --------------- .. py:class:: AlgorithmWithSamplersMixin(settings) Mixin class to use in algorithms that require `samplers`. Note that this mixin should be used with a class inheriting from `AbstractAlgo`, which must have `algo_parameters` attribute. :Parameters: **settings** : :class:`.AlgorithmSettings` The specifications of the algorithm as a :class:`.AlgorithmSettings` instance. Please note that you can customize the number of memory-less (burn-in) iterations by setting either: * `n_burn_in_iter_frac`, such that duration of burn-in phase is a ratio of algorithm `n_iter` (default of 90%) :Attributes: **samplers** : :obj:`dict` [:obj:`str`, :class:`~.algo.samplers.abstract_sampler.AbstractSampler` ] Dictionary of samplers per each variable **current_iteration** : :obj:`int`, default 0 Current iteration of the algorithm. The first iteration will be 1 and the last one `n_iter`. **random_order_variables** : :obj:`bool` (default True) This attribute controls whether we randomize the order of variables at each iteration. Article https://proceedings.neurips.cc/paper/2016/hash/e4da3b7fbbce2345d7772b0674a318d5-Abstract.html gives a rationale on why we should activate this flag. .. !! processed by numpydoc !! .. py:attribute:: samplers :type: dict[str, leaspy.samplers.AbstractSampler] :value: None .. py:attribute:: random_order_variables :type: bool .. py:attribute:: current_iteration :type: int :value: 0