Adaptive Covariance MC

class pints.AdaptiveCovarianceMC(x0, sigma0=None)[source]

Base class for single chain MCMC methods that globally adapt a proposal covariance matrix when running, in order to control the acceptance rate.

Each subclass should provide a method _generate_proposal() that will be called by ask().

Adaptation is implemented with three methods, which are called in sequence, at the end of every tell(): _adapt_mu(), _adapt_sigma(), and _adapt_internal(). A basic implementation is provided for each, which extending methods can choose to override.

Extends SingleChainMCMC.

acceptance_rate()[source]

Returns the current (measured) acceptance rate.

ask()[source]

See SingleChainMCMC.ask().

eta()[source]

Returns eta which controls the rate of adaptation decay adaptations**(-eta), where eta > 0 to ensure asymptotic ergodicity.

in_initial_phase()[source]

See pints.MCMCSampler.in_initial_phase().

n_hyper_parameters()[source]

See TunableMethod.n_hyper_parameters().

name()

Returns this method’s full name.

needs_initial_phase()[source]

See pints.MCMCSampler.needs_initial_phase().

needs_sensitivities()

Returns True if this methods needs sensitivities to be passed in to tell along with the evaluated logpdf.

replace(current, current_log_pdf, proposed=None)[source]

See pints.SingleChainMCMC.replace().

set_eta(eta)[source]

Updates eta which controls the rate of adaptation decay adaptations**(-eta), where eta > 0 to ensure asymptotic ergodicity.

set_hyper_parameters(x)[source]

The hyper-parameter vector is [eta].

See TunableMethod.set_hyper_parameters().

set_initial_phase(initial_phase)[source]

See pints.MCMCSampler.set_initial_phase().

set_target_acceptance_rate(rate=0.234)[source]

Sets the target acceptance rate.

target_acceptance_rate()[source]

Returns the target acceptance rate.

tell(fx)[source]

See pints.SingleChainMCMC.tell().