TransportMaps.Maps.ParametricTransportMapBase

Module Contents

Classes

ParametricTransportMap

Transport map \(T[{\bf a}]({\bf x}): \mathbb{R}^n \times \mathbb{R}^{d_x}\rightarrow\mathbb{R}^{d_x}\).

class TransportMaps.Maps.ParametricTransportMapBase.ParametricTransportMap(**kwargs)[source]

Bases: TransportMaps.Maps.ParametricMapBase.ParametricMap, TransportMaps.Maps.TransportMapBase.TransportMap

Transport map \(T[{\bf a}]({\bf x}): \mathbb{R}^n \times \mathbb{R}^{d_x}\rightarrow\mathbb{R}^{d_x}\).

property n_coeffs[source]

Returns the total number of coefficients.

Returns:

total number \(N\) of coefficients characterizing the transport map.

property coeffs[source]

Returns the actual value of the coefficients.

Returns:

(ndarray [\(N\)]) – coefficients.

abstract get_identity_coeffs()[source]

[Abstract] Returns the coefficients corresponding to the identity map

Returns:

coefficients

Return type:

(ndarray [\(N\)])

Raises:

NotImplementedError – must be implemented in subclasses.

abstract grad_a_inverse(x, precomp=None, idxs_slice=slice(None))[source]

[Abstract] Compute \(\nabla_{\bf a} T^{-1}[{\bf a}]({\bf x})\)

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

  • precomp (dict) – dictionary of precomputed values

  • 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,d,N\)]) –

\(\nabla_{\bf a} T^{-1}[{\bf a}]({\bf x})\)

Raises:

ValueError – if \(d\) does not match the dimension of the transport map.

abstract grad_a_log_det_grad_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]

[Abstract] Compute: \(\nabla_{\bf a} \log \det \nabla_{\bf x} T[{\bf a}]({\bf x})\).

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

  • precomp (dict) – dictionary of precomputed values

  • 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\)]) –

\(\nabla_{\bf a} \log \det \nabla_{\bf x} T[{\bf a}]({\bf x})\) at every evaluation point

See also

log_det_grad_x()

abstract hess_a_log_det_grad_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]

[Abstract] Compute: \(\nabla^2_{\bf a} \log \det \nabla_{\bf x} T[{\bf a}]({\bf x})\).

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

  • precomp (dict) – dictionary of precomputed values

  • 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,N\)]) – \(\nabla^2_{\bf a} \log \det \nabla_{\bf x} T[{\bf a}]({\bf x})\) at every evaluation point

See also

log_det_grad_x() and grad_a_log_det_grad_x()

minimize_kl_divergence_callback(xk)[source]