RejectionPosteriorParameters#

class RejectionPosteriorParameters(max_sampling_batch_size=10000, num_samples_to_find_max=10000, num_iter_to_find_max=100, m=1.2)[source]#

Bases: PosteriorParameters

Parameters for initializing RejectionPosterior.

Fields:
max_sampling_batch_size: The batchsize of samples being drawn from

the proposal at every iteration.

num_samples_to_find_max: The number of samples that are used to find the

maximum of the potential_fn / proposal ratio.

num_iter_to_find_max: The number of gradient ascent iterations to find the

maximum of the potential_fn / proposal ratio.

m: Multiplier to the potential_fn / proposal ratio.

Parameters:
  • max_sampling_batch_size (int)

  • num_samples_to_find_max (int)

  • num_iter_to_find_max (int)

  • m (float)

max_sampling_batch_size: int = 10000#
num_samples_to_find_max: int = 10000#
num_iter_to_find_max: int = 100#
m: float = 1.2#
validate()[source]#

Validate RejectionPosteriorParameters fields.

with_param(**kwargs)#

Create a new instance of the class with updated field values.

Only allows updates to fields defined in the dataclass. Raises an error if any unknown or invalid field names are passed.

Parameters:

**kwargs – Field-value pairs to override in the new instance.

Returns:

A new instance of the same class with updated values.

Raises:

ValueError – If any of the provided keys are not valid dataclass fields.