TransportMaps.Maps.IdentityEmbeddedTransportMapBase

Module Contents

Classes

IdentityEmbeddedTransportMap

Transport map \(T({\bf x},{\bf a}): \mathbb{R}^d \rightarrow \mathbb{R}^d\).

class TransportMaps.Maps.IdentityEmbeddedTransportMapBase.IdentityEmbeddedTransportMap(**kwargs)[source]

Bases: TransportMaps.Maps.TransportMapBase.TransportMap

Transport map \(T({\bf x},{\bf a}): \mathbb{R}^d \rightarrow \mathbb{R}^d\).

Parameters:
  • dim_in (int) – input dimension

  • dim_out (int) – output dimension

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

[Abstract] Evaluate the map \(T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – 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_y\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

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

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

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

  • precomp (dict) – 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\)]) – \(T^{-1}({\bf x})\) for every evaluation point

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

[Abstract] Evaluate the gradient \(\nabla_{\bf x}T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – 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_y,d_x\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

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

[Abstract] Evaluate the action of the gradient \(\langle\nabla_{\bf x}T({\bf x}),\delta{\bf x}\rangle\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\) on the vector \(\delta{\bf x}\).

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

  • dx (ndarray [\(m,d_x,...\)]) – vector \(\delta{\bf x}\)

  • 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_y,...\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

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

[Abstract] Evaluate the action of the gradient \(\langle\delta{\bf x},\nabla_{\bf x}T({\bf x})\rangle\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\) on the vector \(\delta{\bf x}\).

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

  • dx (ndarray [\(m,d_x,...\)]) – vector \(\delta{\bf x}\)

  • 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_y,...\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

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

[Abstract] Evaluate the function and gradient.

Parameters:
  • x (ndarray [\(m,d_x\)]) – 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:

(tuple) – function and gradient evaluation

Raises:

NotImplementedError – to be implemented in sub-classes

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

[Abstract] Evaluate the function and action of the gradient.

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

  • dx (ndarray [\(m,d_x,...\)]) – vector \(\delta{\bf x}\)

  • 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:

(tuple) – function and action of the gradient evaluation

Raises:

NotImplementedError – to be implemented in sub-classes

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

[Abstract] Evaluate the Hessian \(\nabla^2_{\bf x}T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – 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_y,d_x,d_x\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

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

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

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

[Abstract] 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

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

See also

log_det_grad_x().

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

[Abstract] Compute: \(\nabla^2_{\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

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

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

[Abstract] 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

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