nessai.reparameterisations.discrete#

Reparameterisations for discrete variables

Classes#

Dequantise

Reparameterisation that adds noise to discrete variables and then

Module Contents#

class nessai.reparameterisations.discrete.Dequantise(parameters=None, prior_bounds=None, rescale_bounds=None, update_bounds=False, post_rescaling=None, rng=None)#

Bases: nessai.reparameterisations.rescale.RescaleToBounds

Reparameterisation that adds noise to discrete variables and then rescales to the specified bounds.

Can also optionally apply a sigmoid/logit transform after rescaling. See RescaleToBounds for more details.

Note that update_bounds is disabled by default and its use is not recommended with this reparameterisation.

Parameters:
parameterslist[str]

List of parameters to apply the reparameterisation to

prior_boundsdict

Dictionary of prior bounds

rescale_boundsOptional[list]

Bounds to rescale to. Defaults to [-1, 1].

update_boundsbool

Update the bounds for rescaling during sampling. Can be enabled but not recommended.

post_rescalingOptional[str]

Name of the rescaling to apply after rescaling to the specified bounds.

set_bounds(prior_bounds)#

Set the initial bounds for rescaling

pre_rescaling(x)#

Function applied before rescaling to bounds

pre_rescaling_inv(x)#

Inverse of function applied before rescaling to bounds