pybop.samplers.base_sampler#
Classes#
Base class for Monte Carlo samplers. |
Module Contents#
- class pybop.samplers.base_sampler.BaseSampler(log_pdf: pybop.LogPosterior, x0, chains: int, cov0: numpy.ndarray | float)[source]#
Base class for Monte Carlo samplers.
- abstract run() numpy.ndarray[source]#
Sample from the posterior distribution.
- Returns:
Samples from the posterior distribution.
- Return type:
np.ndarray
- set_initial_phase_iterations(iterations=250)[source]#
Set the number of iterations for the initial phase of the sampler.
- Parameters:
iterations (int) – Number of iterations for the initial phase.
- set_max_iterations(iterations=500)[source]#
Set the maximum number of iterations for the sampler.
- Parameters:
iterations (int) – Maximum number of iterations.