TransportMaps.Distributions.ParametricTransportMapDistributions

Module Contents

Classes

PushForwardParametricTransportMapDistribution

Class for densities of the transport map type \(T_\sharp \pi\)

PullBackParametricTransportMapDistribution

Class for densities of the transport map type \(T^\sharp \pi\)

class TransportMaps.Distributions.ParametricTransportMapDistributions.PushForwardParametricTransportMapDistribution(transport_map: TransportMaps.Maps.ParametricTransportMap, base_distribution: TransportMaps.Distributions.DistributionBase.Distribution)[source]

Bases: TransportMaps.Distributions.ParametricTransportMapDistributionBase.ParametricTransportMapDistribution, TransportMaps.Distributions.TransportMapDistributions.PushForwardTransportMapDistribution

Class for densities of the transport map type \(T_\sharp \pi\)

Parameters:
  • transport_map (TransportMap) – transport map \(T\)

  • base_distribution (Distribution) – distribution \(\pi`\)

See also

ParametricTransportMapDistribution

grad_a_log_pdf(x, params=None, idxs_slice=slice(None), cache=None)[source]

Evaluate \(\nabla_{\bf a} \log T_\sharp \pi({\bf x})\)

Parameters:
  • x (ndarray [\(m,d\)]) – evaluation points

  • params (dict) – parameters with keys params_pi, params_t

  • idxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by idxs_slice must match x.shape[0].

  • cache (dict) – cache

Returns:

(ndarray [\(m\)]) – values of

\(\nabla_{\bf a} \log T_\sharp \pi\) at the x points.

class TransportMaps.Distributions.ParametricTransportMapDistributions.PullBackParametricTransportMapDistribution(transport_map: TransportMaps.Maps.ParametricTransportMap, base_distribution: TransportMaps.Distributions.DistributionBase.Distribution)[source]

Bases: TransportMaps.Distributions.ParametricTransportMapDistributionBase.ParametricTransportMapDistribution, TransportMaps.Distributions.TransportMapDistributions.PullBackTransportMapDistribution

Class for densities of the transport map type \(T^\sharp \pi\)

Parameters:
  • transport_map (TransportMap) – transport map \(T\)

  • base_distribution (Distribution) – distribution \(\pi`\)

See also

ParametricTransportMapDistribution

grad_a_log_pdf(x, params=None, idxs_slice=slice(None), cache=None)[source]

Evaluate \(\nabla_{\bf a} \log T^\sharp \pi({\bf x})\)

Parameters:
  • x (ndarray [\(m,n\)]) – evaluation points

  • params (dict) – parameters with keys params_pi, params_t

  • idxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by idxs_slice must match x.shape[0].

  • cache (dict) – cache

Returns:

(ndarray [\(m,n\)]) – values of

\(\nabla_{\bf a} \log T^\sharp \pi\) at the x points.

grad_a_hess_x_log_pdf(x, params=None, idxs_slice=slice(None))[source]

Evaluate \(\nabla_{\bf a} \nabla^2_{\bf x} \log T^\sharp \pi({\bf x})\)

Parameters:
  • x (ndarray [\(m,n,d,d\)]) – evaluation points

  • params (dict) – parameters with keys params_pi, params_t

  • idxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by idxs_slice must match x.shape[0].

Returns:

(ndarray [\(m,n,d,d\)]) – values of

\(\nabla_{\bf a} \nabla^2_{\bf x} \log T^\sharp \pi\) at the x points.

tuple_grad_a_log_pdf(x, params=None, idxs_slice=slice(None), cache=None)[source]

Evaluate \(\left(\log T^\sharp \pi({\bf x}), \nabla_{\bf a} \log T^\sharp \pi({\bf x})\right)\)

Parameters:
  • x (ndarray [\(m,d\)]) – evaluation points

  • params (dict) – parameters with keys params_pi, params_t

  • idxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by idxs_slice must match x.shape[0].

  • cache (dict) – cache

Returns:

(tuple) –

\(\left(\log T^\sharp \pi({\bf x}), \nabla_{\bf a} \log T^\sharp \pi({\bf x})\right)\)

hess_a_log_pdf(x, params=None, idxs_slice=slice(None), cache=None)[source]

Evaluate \(\nabla^2_{\bf a} \log T^\sharp \pi({\bf x})\)

Parameters:
  • x (ndarray [\(m,d\)]) – evaluation points

  • params (dict) – parameters with keys params_pi, params_t

  • idxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by idxs_slice must match x.shape[0].

  • cache (dict) – cache

Returns:

(ndarray [\(m\)]) – values of

\(\nabla^2_{\bf a} \log T^\sharp \pi\) at the x points.

action_hess_a_log_pdf(x, da, params=None, idxs_slice=slice(None), cache=None)[source]

Evaluate \(\langle\nabla^2_{\bf a} \log T^\sharp \pi({\bf x}), \delta{\bf a}\rangle\)

Parameters:
  • x (ndarray [\(m,d\)]) – evaluation points

  • da (ndarray [\(N\)]) – direction on which to evaluate the Hessian

  • params (dict) – parameters with keys params_pi, params_t

  • idxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by idxs_slice must match x.shape[0].

  • cache (dict) – cache

Returns:

(ndarray [\(m\)]) – values of

\(\langle\nabla^2_{\bf a} \log T^\sharp \pi({\bf x}), \delta{\bf a}\rangle\) at the x points.