# TransportMaps.Maps.Functionals.AnchoredIntegratedSquaredParametricFunctionalBase¶

## Module Contents¶

### Classes¶

 AnchoredIntegratedSquaredParametricFunctional Parameteric function $$f_{\bf a}({\bf x}) = \int_0^{x_d} h_{\bf a}^2(x_1,\ldots,x_{d-1},t) dt$$ IntegratedSquaredParametricFunctionApproximation Parameteric function $$f_{\bf a}({\bf x}) = \int_0^{x_d} h_{\bf a}^2(x_1,\ldots,x_{d-1},t) dt$$
class TransportMaps.Maps.Functionals.AnchoredIntegratedSquaredParametricFunctionalBase.AnchoredIntegratedSquaredParametricFunctional(h, integ_ord_mult=6)[source]

Parameteric function $$f_{\bf a}({\bf x}) = \int_0^{x_d} h_{\bf a}^2(x_1,\ldots,x_{d-1},t) dt$$

Parameters:
• h (ParametricFunctionApproximation) – parametric function $$h$$

• integ_ord_mult (int) – multiplier for the number of Gauss points to be used in the approximation of $$\int_0^{{\bf x}_d}$$. The resulting number of points is given by the product of the order in the $$d$$ direction and integ_ord_mult.

property dim_in[source]
property n_coeffs[source]

Get the number $$N$$ of coefficients $${\bf a}$$

Returns:

(int) – number of coefficients

property coeffs[source]

Get the coefficients $${\bf a}$$

Returns:

(ndarray [$$N$$]) – coefficients

property multi_idxs[source]
property semilattice[source]
property basis_list[source]
property full_basis_list[source]
init_coeffs()[source]

Initialize the coefficients $${\bf a}$$

get_multi_idxs()[source]

Get the list of multi indices

Returns:

(list of tuple) – multi indices

set_multi_idxs(multi_idxs)[source]

Set the list of multi indices

Parameters:

multi_idxs (list of tuple) – multi indices

precomp_evaluate(x, precomp=None, precomp_type='uni')[source]

[Abstract] Precompute necessary structures for the evaluation of $$f_{\bf a}$$ at x.

Parameters:

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

Returns:

(dict) – data structures

evaluate(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Evaluate $$f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1$$]) – function evaluations

[Abstract] Precompute necessary structures for the evaluation of $$\nabla_{\bf x} f_{\bf a}$$ at x

Parameters:

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

Returns:

(dict) – data structures

Evaluate $$\nabla_{\bf x} f_{\bf a}$$ at 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.

Returns:

(ndarray [$$m,1,d$$]) –

$$\nabla_{\bf x} f_{\bf a}({\bf x})$$

Evaluate $$\nabla{\bf a} \nabla_{\bf x} f_{\bf a}$$ at 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.

Returns:

(ndarray [$$m,1,N,d$$]) –

$$\nabla_{\bf a}\nabla_{\bf x} f_{\bf a}({\bf x})$$

precomp_hess_x(x, precomp, precomp_type='uni')[source]
hess_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]

Evaluate $$\nabla^2_{\bf x} f_{\bf a}$$ at 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.

Returns:

(ndarray [$$m,1,d,d$$]) –

$$\nabla^2_{\bf x} f_{\bf a}({\bf x})$$

Evaluate $$\nabla{\bf a} \nabla^2_{\bf x} f_{\bf a}$$ at 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.

Returns:

(ndarray [$$m,1,N,d,d$$]) –

$$\nabla{\bf a} \nabla^2_{\bf x} f_{\bf a}({\bf x})$$

Evaluate $$\nabla_{\bf a} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,N$$]) –

$$\nabla_{\bf a} f_{\bf a}({\bf x})$$

hess_a(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]

Evaluate $$\nabla^2_{\bf a} f_{\bf a}$$ at 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.

Returns:

(ndarray [$$m,1,N,N$$]) –

$$\nabla^2_{\bf a} f_{\bf a}({\bf x})$$

precomp_partial_xd(x, precomp=None, precomp_type='uni')[source]

[Abstract] Precompute necessary structures for the evaluation of $$\partial_{x_d} f_{\bf a}$$ at x.

Parameters:

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

Returns:

(dict) – data structures

partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Evaluate $$\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1$$]) –

$$\partial_{x_d} f_{\bf a}({\bf x})$$

[Abstract] Precompute necessary structures for the evaluation of $$\nabla_{\bf x}\partial_{x_d} f_{\bf a}$$ at x.

Parameters:

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

Returns:

(dict) – data structures

Evaluate $$\nabla_{\bf x}\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,d$$]) –

$$\nabla_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})$$

Evaluate $$\nabla_{\bf a}\nabla_{\bf x}\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,N,d$$]) –

$$\nabla_{\bf a}\nabla_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})$$

precomp_hess_x_partial_xd(x, precomp=None, precomp_type='uni')[source]
hess_x_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Evaluate $$\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,d,d$$]) –

$$\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})$$

Evaluate $$\nabla_{\bf a}\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,N,d,d$$]) –

$$\nabla_{\bf a}\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})$$

precomp_partial2_xd(x, precomp=None, precomp_type='uni')[source]

[Abstract] Precompute necessary structures for the evaluation of $$\partial^2_{x_d} f_{\bf a}$$ at x.

Parameters:

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

Returns:

(dict) – data structures

partial2_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Evaluate $$\partial^2_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1$$]) –

$$\partial^2_{x_d} f_{\bf a}({\bf x})$$

Evaluate $$\nabla_{\bf a}\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,N$$]) –

$$\nabla_{\bf a}\partial_{x_d} f_{\bf a}({\bf x})$$

hess_a_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

Evaluate $$\nabla^2_{\bf a}\partial_{x_d} f_{\bf a}$$ at 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.

• cache (dict) – cache

Returns:

(ndarray [$$m,1,N,N$$]) –

$$\nabla^2_{\bf a}\partial_{x_d} f_{\bf a}({\bf x})$$

class TransportMaps.Maps.Functionals.AnchoredIntegratedSquaredParametricFunctionalBase.IntegratedSquaredParametricFunctionApproximation(*args, **kwargs)[source]

Parameteric function $$f_{\bf a}({\bf x}) = \int_0^{x_d} h_{\bf a}^2(x_1,\ldots,x_{d-1},t) dt$$

Parameters:
• h (ParametricFunctionApproximation) – parametric function $$h$$

• integ_ord_mult (int) – multiplier for the number of Gauss points to be used in the approximation of $$\int_0^{{\bf x}_d}$$. The resulting number of points is given by the product of the order in the $$d$$ direction and integ_ord_mult.