pybop.samplers.base_sampler#
Classes#
Base class for Monte Carlo samplers. |
|
Base options for the sampler. |
Module Contents#
- class pybop.samplers.base_sampler.BaseSampler(log_pdf: pybop.problems.problem.Problem, options: SamplerOptions | None = None)[source]#
Base class for Monte Carlo samplers.
- Parameters:
log_pdf (pybop.Problem) – The negative unnormalised posterior distribution.
options (SamplerOptions, optional) – Options for the sampler. If None, default options are used.
- static default_options() SamplerOptions[source]#
Get the default options for the sampler.
- abstractmethod run() numpy.ndarray[source]#
Sample from the posterior distribution.
- Returns:
Samples from the posterior distribution.
- Return type:
np.ndarray
- set_initial_phase_iterations(iterations: int = 250)[source]#
Set the number of iterations for the initial phase of the sampler.
- set_max_iterations(iterations: int = 500)[source]#
Set the maximum number of iterations for the sampler.
- set_warm_up_iterations(iterations: int = 250)[source]#
Set the number of warm up iterations for the sampler.
- property log_pdf: pybop.problems.problem.Problem[source]#
- property options: SamplerOptions[source]#