ImportanceSamplingPosteriorParameters#
- class ImportanceSamplingPosteriorParameters(theta_transform=None, method='sir', oversampling_factor=32, max_sampling_batch_size=10000)[source]#
Bases:
PosteriorParametersParameters for initializing ImportanceSamplingPosterior.
- Fields:
- theta_transform: Transformation that is applied to parameters. Is not used
during but only when calling .map().
- method: Either of [sir`|`importance]. This sets the behavior of the
.sample() method. With sir, approximate posterior samples are generated with sampling importance resampling (SIR). With importance, the .sample() method returns a tuple of samples and corresponding importance weights.
- oversampling_factor: Number of proposed samples from which only one is
selected based on its importance weight.
- max_sampling_batch_size: The batch size of samples being drawn from the
proposal at every iteration.
- Parameters:
- 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.