leaspy.algo.fit.mcmc_saem

This module defines the TensorMCMCSAEM class.

Classes

TensorMcmcSaemAlgorithm

Main algorithm for MCMC-SAEM.

Module Contents

class TensorMcmcSaemAlgorithm(settings)[source]

Bases: leaspy.algo.algo_with_device.AlgorithmWithDeviceMixin, leaspy.algo.algo_with_annealing.AlgorithmWithAnnealingMixin, leaspy.algo.algo_with_samplers.AlgorithmWithSamplersMixin, leaspy.algo.fit.base.FitAlgorithm[leaspy.models.McmcSaemCompatibleModel, leaspy.variables.state.State]

Main algorithm for MCMC-SAEM.

Parameters:
settingsAlgorithmSettings

MCMC fit algorithm settings

Attributes:
samplersdict [str, AbstractSampler ]

Dictionary of samplers per each variable

random_order_variablesbool (default True)

This attribute controls whether we randomize the order of variables at each iteration. Article gives a reason on why we should activate this flag.

temperaturefloat
temperature_invfloat

Temperature and its inverse are modified during algorithm if annealing is used

Parameters:

settings (AlgorithmSettings)

See also

leaspy.samplers
name: AlgorithmName
log_current_iteration(state)[source]
Parameters:

state (State)

is_current_iteration_in_last_n()[source]

Return True if current iteration is within the last n realizations defined in logging settings.

should_current_iteration_be_saved()[source]

Return True if current iteration should be saved based on log saving periodicity.