TransportMaps.Maps.ListCompositeMapBase¶

Module Contents¶

Classes¶

 ListCompositeMap Construct the composite map $$T_1 \circ T_2 \circ \cdots \circ T_n$$ CompositeMap Given maps $$T_1,T_2$$, define map $$T=T_1 \circ T_2$$.
class TransportMaps.Maps.ListCompositeMapBase.ListCompositeMap(**kwargs)[source]

Construct the composite map $$T_1 \circ T_2 \circ \cdots \circ T_n$$

property map_list[source]
property dim_in[source]
property dim_out[source]
property n_maps[source]
append(mp)[source]

Append one map to the composition.

get_ncalls_tree(indent='')[source]
get_nevals_tree(indent='')[source]
get_teval_tree(indent='')[source]
update_ncalls_tree(obj)[source]
update_nevals_tree(obj)[source]
update_teval_tree(obj)[source]
reset_counters()[source]
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:
• 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$$]) – transformed points

Raises:

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

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.

[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 points

• dx (ndarray [$$m,d_x,...$$]) – vector $$\delta{\bf x}$$

• 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_y,...$$]) – transformed points

Parameters:
• x (ndarray [$$m,d_x$$]) – 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:

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

inverse(x, *args, **kwargs)[source]

Compute: $$T^{\dagger}({\bf y})$$

Parameters:

x (ndarray [$$m,d$$]) – evaluation points

Returns:

(ndarray [$$m,d$$]) – $$T^{-1}({\bf y})$$ for every evaluation point

Compute $$\nabla_{\bf x} T^{\dagger}({\bf x})$$.

Parameters:

x (ndarray [$$m,d$$]) – evaluation points

Returns:

(ndarray [$$m,d,d$$]) – gradient matrices for every evaluation point.

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]

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$$