# TransportMaps.Maps.DiagonalIsotropicTransportMapBase¶

## Module Contents¶

### Classes¶

 DiagonalIsotropicTransportMap 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]

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 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].

• cache (dict) – cache

Returns:

(ndarray [$$m,d$$]) – transformed points

Raises:

ValueError – if $$d$$ does not match the dimension of the transport map.

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:
• 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 [$$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:
• 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 [$$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.

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 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].

• 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.

Compute: $$\nabla_{\bf x} \log \det \nabla_{\bf x} T({\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 [$$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.

Compute: $$\nabla^2_{\bf x} \log \det \nabla_{\bf x} T({\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 [$$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.