TransportMaps.Maps.DiagonalIsotropicTransportMapBase
¶
Module Contents¶
Classes¶
Diagonal transport map \(T({\bf x})=[T_1,T_2,\ldots,T_{d_x}]^\top\) where \(T_i(x_{i})=F(x_i):\mathbb{R}\rightarrow\mathbb{R}\). |
- class TransportMaps.Maps.DiagonalIsotropicTransportMapBase.DiagonalIsotropicTransportMap(**kwargs)[source]¶
Bases:
TransportMaps.Maps.DiagonalComponentwiseTransportMapBase.DiagonalComponentwiseTransportMap
Diagonal transport map \(T({\bf x})=[T_1,T_2,\ldots,T_{d_x}]^\top\) where \(T_i(x_{i})=F(x_i):\mathbb{R}\rightarrow\mathbb{R}\).
- evaluate(x, *args, **kwargs)[source]¶
Evaluate the transport map at the points \({\bf x} \in \mathbb{R}^{m \times d}\).
- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
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]
.cache (
dict
) – cache
- Returns:
(
ndarray
[\(m,d\)]) – transformed points- Raises:
ValueError – if \(d\) does not match the dimension of the transport map.
- grad_x(x, *args, **kwargs)[source]¶
Compute \(\nabla_{\bf x} T({\bf x})\).
This is
\nabla_{\bf x} T({\bf x},{\bf a}) = \begin{bmatrix} \nabla_{\bf x} T_1({\bf x}) \\ \nabla_{\bf x} T_2({\bf x}) \\ \vdots \\ \nabla_{\bf x} T_d({\bf x}) \end{bmatrix}for every evaluation point.
- 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.
- hess_x(x, *args, **kwargs)[source]¶
Compute \(\nabla^2_{\bf x} T({\bf x})\).
This is the tensor
\[\left[\nabla^2_{\bf x} T({\bf x})\right]_{i,k,:,:} = \nabla^2_{\bf x} T_k({\bf x}^{(i)})\]- 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.
- log_det_grad_x(x, *args, **kwargs)[source]¶
Compute: \(\log \det \nabla_{\bf x} T({\bf x})\).
Since the map is lower triangular,
\[\log \det \nabla_{\bf x} T({\bf x}) = \sum_{k=1}^d \log \partial_{{\bf x}_k} T_k({\bf x}_{1:k})\]- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
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]
.cache (
dict
) – cache
- Returns:
(
ndarray
[\(m\)]) – \(\log \det \nabla_{\bf x} T({\bf x})\) at every evaluation point- Raises:
ValueError – if \(d\) does not match the dimension of the transport map.
- grad_x_log_det_grad_x(x, *args, **kwargs)[source]¶
Compute: \(\nabla_{\bf x} \log \det \nabla_{\bf x} T({\bf x})\)
- Parameters:
- Returns:
(
ndarray
[\(m,d\)]) – \(\nabla_{\bf x} \log \det \nabla_{\bf x} T({\bf x})\) at every evaluation point- Raises:
ValueError – if \(d\) does not match the dimension of the transport map.
See also
- hess_x_log_det_grad_x(x, *args, **kwargs)[source]¶
Compute: \(\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\bf x})\)
- Parameters:
- Returns:
(
ndarray
[\(m,d,d\)]) – \(\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\bf x})\) at every evaluation point- Raises:
ValueError – if \(d\) does not match the dimension of the transport map.
See also