TransportMaps.Maps.ListCompositeTransportMapBase

Module Contents

Classes

ListCompositeTransportMap

Composition of transport maps \(T({\bf x}) := T_1 \circ T_2 \circ \ldots \circ T_k({\bf x})\).

CompositeTransportMap

Composition of two transport maps \(T({\bf x}) := T_1 \circ T_2\).

class TransportMaps.Maps.ListCompositeTransportMapBase.ListCompositeTransportMap(**kwargs)[source]

Bases: TransportMaps.Maps.ListCompositeMapBase.ListCompositeMap, TransportMaps.Maps.TransportMapBase.TransportMap

Composition of transport maps \(T({\bf x}) := T_1 \circ T_2 \circ \ldots \circ T_k({\bf x})\).

inverse(x, *args, **kwargs)[source]
Parameters:

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

Returns:

(ndarray [\(m,d\)]) – \(T^{-1}({\bf y})\) for every evaluation point

grad_x_inverse(x, *args, **kwargs)[source]

Compute \(\nabla_{\bf x} T^{-1}({\bf x})\).

Parameters:

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

Returns:

(ndarray [\(m,d,d\)]) – gradient matrices for every evaluation point.

hess_x_inverse(x, *args, **kwargs)[source]

Compute \(\nabla^2_{\bf x} T^{-1}({\bf x})\).

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

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d,d,d\)]) – Hessian matrices for every evaluation point and every dimension.

Raises:

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

action_hess_x_inverse(x, dx, *args, **kwargs)[source]

Compute \(\langle\nabla^2_{\bf x} T^{-1}({\bf x}), \delta{\bf x}\rangle\).

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

  • dx (ndarray [\(m,d\)]) – direction on which to evaluate the Hessian

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d,d,d\)]) – action of the Hessian matrices for every evaluation point and every dimension.

Raises:

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

log_det_grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Compute: \(\log \det \nabla_{\bf x} T({\bf x}, {\bf a})\).

For the transport maps \(T_1,T_2\),

\[\log \det \nabla_{\bf x} (T_1 \circ T_2)({\bf x}) = \log \det \nabla_{\bf x} T_1 ({\bf y}) + \log \det \nabla_{\bf x} T_2({\bf x})\]

where \({\bf y} = T_2({\bf x})\).

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

  • precomp (dict) – dictionary of precomputed values

Returns:

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

grad_x_log_det_grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Compute: \(\nabla_{\bf x} \log \det \nabla_{\bf x} T({\bf x}, {\bf a})\)

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

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d\)]) – \(\nabla_{\bf x} \log \det \nabla_{\bf x} T({\bf x}, {\bf a})\) at every evaluation point

Raises:

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

See also

log_det_grad_x().

log_det_grad_x_inverse(x, precomp=None, *args, **kwargs)[source]

Compute: \(\log \det \nabla_{\bf x} T^{-1}({\bf x}, {\bf a})\).

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

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m\)]) – \(\log \det \nabla_{\bf x} T^{-1}({\bf x}, {\bf a})\) at every evaluation point

grad_x_log_det_grad_x_inverse(x, precomp=None, *args, **kwargs)[source]

Compute: \(\nabla_{\bf x} \log \det \nabla_{\bf x} T^{-1}({\bf x}, {\bf a})\).

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

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m\)]) – \(\nabla_{\bf x} \log \det \nabla_{\bf x} T^{-1}({\bf x}, {\bf a})\) at every evaluation point

class TransportMaps.Maps.ListCompositeTransportMapBase.CompositeTransportMap(t1, t2)[source]

Bases: ListCompositeTransportMap

Composition of two transport maps \(T({\bf x}) := T_1 \circ T_2\).

hess_x_log_det_grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Compute: \(\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\bf x})\)

For the transport maps \(T_1,T_2\),

\[\nabla^2_{\bf x} \log \det \nabla_{\bf x} (T_1 \circ T_2) = \left[ \nabla^2_{\bf x} \log \det (\nabla_{\bf x} T_1 \circ T_2) \cdot \nabla_{\bf x} T_2 + \nabla_{\bf x} \log \det \nabla_{\bf x} T_2 \right] \cdot (\nabla_{\bf x} T_2) + \nabla_{\bf x} \log \det (\nabla_{\bf x} T_1 \circ T_2) \cdot \nabla^2_{\bf x} T_2 + \nabla^2_{\bf x} \log \det \nabla_{\bf x} T_2\]
Parameters:
  • x (ndarray [\(m,d\)]) – evaluation points

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d,d\)]) – \(\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\bf x})\) at every evaluation point

Raises:

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

See also

log_det_grad_x() and grad_x_log_det_grad_x().

action_hess_x_log_det_grad_x(x, dx, precomp=None, idxs_slice=slice(None), cache=None)[source]

Compute: \(\langle\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\bf x}), \delta{\bf x}\rangle\)

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

  • dx (ndarray [\(m,d\)]) – direction on which to evaluate the Hessian

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d\)]) –

\(\langle\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\bf x}), \delta{\bf x}\rangle\) at every evaluation point

Raises:

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

hess_x_log_det_grad_x_inverse(x, precomp=None, *args, **kwargs)[source]

Compute: \(\nabla^2_{\bf x} \log \det \nabla_{\bf x} T^{-1}({\bf x})\)

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

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d,d\)]) – \(\nabla^2_{\bf x} \log \det \nabla_{\bf x} T^{-1}({\bf x})\) at every evaluation point

Raises:

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

See also

log_det_grad_x() and grad_x_log_det_grad_x().

action_hess_x_log_det_grad_x_inverse(x, dx, precomp=None, *args, **kwargs)[source]

Compute: \(\langle\nabla^2_{\bf x} \log \det \nabla_{\bf x} T^{-1}({\bf x}), \delta{\bf x}\rangle\)

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

  • dx (ndarray [\(m,d\)]) – direction on which to evaluate the Hessian

  • precomp (dict) – dictionary of precomputed values

Returns:

(ndarray [\(m,d,d\)]) – \(\langle\nabla^2_{\bf x} \log \det \nabla_{\bf x} T^{-1}({\bf x}), \delta{\bf x}\rangle\) at every evaluation point

Raises:

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

See also

log_det_grad_x() and grad_x_log_det_grad_x().