gw.transforms.gnpe_transforms.GNPEBase

gw.transforms.gnpe_transforms.GNPEBase(kernel_dict, operators)

A base class for Group Equivariant Neural Posterior Estimation 1.

This implements GNPE for approximate equivariances. For exact equivariances, additional processing should be implemented within a subclass.

Attributes

Name Description
context_parameters
input_parameter_names
kernel
operators
proxy_list

Methods

Name Description
inverse
multiply
perturb Generate proxy variables based on initial parameter values.
sample_proxies Given input parameters, perturbs based on the

inverse

gw.transforms.gnpe_transforms.GNPEBase.inverse(a, k)

multiply

gw.transforms.gnpe_transforms.GNPEBase.multiply(a, b, k)

perturb

gw.transforms.gnpe_transforms.GNPEBase.perturb(g, k)

Generate proxy variables based on initial parameter values.

Parameters

Name Type Description Default
g Union[np.float64, float, torch.Tensor] Initial parameter values required
k str Parameter name. This is used to identify the group binary operator. required

Returns

Name Type Description
Proxy variables in the same format as g.

sample_proxies

gw.transforms.gnpe_transforms.GNPEBase.sample_proxies(input_parameters)

Given input parameters, perturbs based on the kernel to produce “proxy” (“hatted”) parameters, i.e., samples

\hat g ~ p(\hat g | g).

Typically the GNPE NDE will be conditioned on g. Furthermore, these proxy parameters will be used to transform the data to simplify it.

Parameters:

input_parameters : dict Initial parameter values to be perturbed. dict values can be either floats (for training) or torch Tensors (for inference).

Returns

Name Type Description
A dict of proxy parameters.