TransportMaps.Maps.ListCompositeMapBase
¶
Module Contents¶
Classes¶
Construct the composite map \(T_1 \circ T_2 \circ \cdots \circ T_n\) |
|
Given maps \(T_1,T_2\), define map \(T=T_1 \circ T_2\). |
- class TransportMaps.Maps.ListCompositeMapBase.ListCompositeMap(**kwargs)[source]¶
Bases:
TransportMaps.Maps.MapBase.Map
Construct the composite map \(T_1 \circ T_2 \circ \cdots \circ T_n\)
- evaluate(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate the transport map at the points \({\bf x} \in \mathbb{R}^{m \times d}\).
- Parameters:
- Returns:
(
ndarray
[\(m,d\)]) – transformed points- Raises:
ValueError – if \(d\) does not match the dimension of the transport map.
- grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Compute \(\nabla_{\bf x} T({\bf x})\).
Apply chain rule.
- Parameters:
- Returns:
(
ndarray
[\(m,d,d\)]) – gradient matrices for every evaluation point.- Raises:
ValueError – if \(d\) does not match the dimension of the transport map.
- 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 pointsdx (
ndarray
[\(m,d_x,...\)]) – vector \(\delta{\bf x}\)precomp (
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
[\(m,d_y,...\)]) – transformed points
- tuple_grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate the function and gradient.
- Parameters:
- Returns:
(
tuple
) – function and gradient evaluation
- hess_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Compute \(\nabla^2_{\bf x} T({\bf x})\).
Apply chain rule.
- Parameters:
- 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(x, dx, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Compute \(\langle\nabla^2_{\bf x} T({\bf x}), \delta{\bf x}\rangle\).
Apply chain rule.
- Parameters:
- Returns:
(
ndarray
[\(m,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.
- hess_x_inverse(x, *args, **kwargs)[source]¶
Compute \(\nabla^2_{\bf x} T^{\dagger}({\bf x})\).
- Parameters:
- 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^{\dagger}({\bf x}), \delta{\bf x}\rangle\).
- Parameters:
- 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.
- class TransportMaps.Maps.ListCompositeMapBase.CompositeMap(t1, t2)[source]¶
Bases:
ListCompositeMap
Given maps \(T_1,T_2\), define map \(T=T_1 \circ T_2\).
- Parameters:
t1 (
Map
) – map \(T_1\)t2 (
Map
) – map \(T_2\)