TransportMaps.Maps.ListStackedMapBase
¶
Module Contents¶
Classes¶
Defines the map \(T\) obtained by stacking \(T_1, T_2, \ldots\). |
- class TransportMaps.Maps.ListStackedMapBase.ListStackedMap(**kwargs)[source]¶
Bases:
TransportMaps.Maps.MapBase.Map
Defines the map \(T\) obtained by stacking \(T_1, T_2, \ldots\).
\[\begin{split}T({\bf x}) = \left[ \begin{array}{c} T_1({\bf x}_{0:d_1}) \\ T_2({\bf x}_{0:d_2}) \\ \vdots \end{array} \right]\end{split}\]- 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:
- Returns:
(
ndarray
[\(m,d_y\)]) – transformed points- Raises:
NotImplementedError – to be implemented in sub-classes
- 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:
- Returns:
(
ndarray
[\(m,d_y,d_x\)]) – transformed points- Raises:
NotImplementedError – to be implemented in sub-classes
- tuple_grad_x(x, *args, **kwargs)[source]¶
[Abstract] Evaluate the function and gradient.
- Parameters:
- Returns:
(
tuple
) – function and 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:
- Returns:
(
ndarray
[\(m,d_y,d_x,d_x\)]) – transformed points- Raises:
NotImplementedError – to be implemented in sub-classes
- action_hess_x(x, dx, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate the action of the Hessian \(\langle\nabla^2_{\bf x}T,\delta{\bf x}\rangle\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).
- Parameters:
x (
ndarray
[\(m,d_x\)]) – evaluation pointsdx (
ndarray
[\(m,d_x\)]) – 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
[\(m,d_y,d_x\)]) – transformed points- Raises:
NotImplementedError – to be implemented in sub-classes