TransportMaps.Maps.IdentityEmbeddedParametricTransportMapBase

Module Contents

Classes

IdentityEmbeddedParametricTransportMap

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

class TransportMaps.Maps.IdentityEmbeddedParametricTransportMapBase.IdentityEmbeddedParametricTransportMap(**kwargs)[source]

Bases: TransportMaps.Maps.IdentityEmbeddedTransportMapBase.IdentityEmbeddedTransportMap, TransportMaps.Maps.ParametricTransportMapBase.ParametricTransportMap

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

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.

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.

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

Compute \(\nabla_{\bf a} 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) – gradient

Raises:

NotImplementedError – needs to be implemented in subclasses

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

Compute \((T[{\bf a}]({\bf x}), \nabla_{\bf a} 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) – gradient

Raises:

NotImplementedError – needs to be implemented in subclasses

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

Compute \(\nabla^2_{\bf a} 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) – Hessian

Raises:

NotImplementedError – needs to be implemented in subclasses

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

Compute \(\langle\nabla^2_{\bf a} T[{\bf a}]({\bf x}), \delta{\bf a}\rangle\)

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

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

  • 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) – action of the Hessian

Raises:

NotImplementedError – needs to be implemented in subclasses

grad_a_log_det_grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[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()

hess_a_log_det_grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[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()

action_hess_a_log_det_grad_x(x, da, precomp=None, idxs_slice=slice(None), cache=None)[source]
precomp_minimize_kl_divergence(*args, **kwargs)[source]
allocate_cache_minimize_kl_divergence(*args, **kwargs)[source]
reset_cache_minimize_kl_divergence(*args, **kwargs)[source]
get_default_init_values_minimize_kl_divergence()[source]