TransportMaps.Maps.IdentityEmbeddedParametricTransportMapBase
¶
Module Contents¶
Classes¶
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\).
- 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:
- 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:
- 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:
- 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 pointsda (
ndarray
[\(N\)]) – direction on which to evaluate the Hessianprecomp (
dict
) – dictionary of precomputed valuesidxs_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 matchx.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:
- 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:
- 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()
andgrad_a_log_det_grad_x()