beanmachine.ppl.inference.single_site_inference module

class beanmachine.ppl.inference.single_site_inference.SingleSiteInference(proposer_class: Type[beanmachine.ppl.inference.proposer.base_single_site_mh_proposer.BaseSingleSiteMHProposer], **kwargs)

Bases: beanmachine.ppl.inference.base_inference.BaseInference

Base class for single site inference algorithms.

Parameters

proposer_class – Class of proposer to initialize with

get_proposers(world: beanmachine.ppl.world.world.World, target_rvs: Set[beanmachine.ppl.model.rv_identifier.RVIdentifier], num_adaptive_sample: int) List[beanmachine.ppl.inference.proposer.base_proposer.BaseProposer]

Returns the proposer(s) corresponding to every non-observed variable in target_rvs. Should be implemented by the specific inference algorithm.