TransportMaps.Maps.ListStackedParametricMapBase

Module Contents

Classes

ListStackedParametricMap

Defines the map \(T\) obtained by stacking \(T_1, T_2, \ldots\).

class TransportMaps.Maps.ListStackedParametricMapBase.ListStackedParametricMap(**kwargs)[source]

Bases: TransportMaps.Maps.ListStackedMapBase.ListStackedMap, TransportMaps.Maps.ParametricMapBase.ParametricMap

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}\]
property n_coeffs[source]

Returns the total number of coefficients.

Returns:

(int) – total number \(N\) of

coefficients characterizing the map.

Raises:

NotImplementedError – needs to be implemented in subclasses

property coeffs[source]

Returns the actual value of the coefficients.

Returns:

(ndarray [\(N\)]) – coefficients.

Raises:

NotImplementedError – needs to 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

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