TransportMaps.Maps.Functionals.AnchoredIntegratedSquaredParametricFunctionalBase
¶
Module Contents¶
Classes¶
Parameteric function \(f_{\bf a}({\bf x}) = \int_0^{x_d} h_{\bf a}^2(x_1,\ldots,x_{d-1},t) dt\) |
|
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]¶
Bases:
TransportMaps.Maps.Functionals.ParametricFunctionalBase.ParametricFunctional
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 n_coeffs[source]¶
Get the number \(N\) of coefficients \({\bf a}\)
- Returns:
(
int
) – number of coefficients
- precomp_evaluate(x, precomp=None, precomp_type='uni')[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(f_{\bf a}\) at
x
.
- evaluate(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(f_{\bf a}\) at
x
.- 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,1\)]) – function evaluations
- precomp_grad_x(x, precomp, precomp_type='uni')[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\nabla_{\bf x} f_{\bf a}\) at
x
- grad_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]¶
Evaluate \(\nabla_{\bf x} f_{\bf a}\) at
x
.- Parameters:
- Returns:
- (
ndarray
[\(m,1,d\)]) – \(\nabla_{\bf x} f_{\bf a}({\bf x})\)
- (
- grad_a_grad_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]¶
Evaluate \(\nabla{\bf a} \nabla_{\bf x} f_{\bf a}\) at
x
.- Parameters:
- Returns:
- (
ndarray
[\(m,1,N,d\)]) – \(\nabla_{\bf a}\nabla_{\bf x} f_{\bf a}({\bf x})\)
- (
- hess_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]¶
Evaluate \(\nabla^2_{\bf x} f_{\bf a}\) at
x
.- Parameters:
- Returns:
- (
ndarray
[\(m,1,d,d\)]) – \(\nabla^2_{\bf x} f_{\bf a}({\bf x})\)
- (
- grad_a_hess_x(x, precomp=None, idxs_slice=slice(None), *args, **kwargs)[source]¶
Evaluate \(\nabla{\bf a} \nabla^2_{\bf x} f_{\bf a}\) at
x
.- Parameters:
- Returns:
- (
ndarray
[\(m,1,N,d,d\)]) – \(\nabla{\bf a} \nabla^2_{\bf x} f_{\bf a}({\bf x})\)
- (
- grad_a(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla_{\bf a} f_{\bf a}\) at
x
.- 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,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:
- 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
.
- 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 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,1\)]) – \(\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- precomp_grad_x_partial_xd(x, precomp=None, precomp_type='uni')[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\nabla_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.
- grad_x_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.- 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,1,d\)]) – \(\nabla_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- grad_a_grad_x_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla_{\bf a}\nabla_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.- 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,1,N,d\)]) – \(\nabla_{\bf a}\nabla_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- 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 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,1,d,d\)]) – \(\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- grad_a_hess_x_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla_{\bf a}\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.- 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,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
.
- 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 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,1\)]) – \(\partial^2_{x_d} f_{\bf a}({\bf x})\)
- (
- grad_a_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla_{\bf a}\partial_{x_d} f_{\bf a}\) at
x
.- 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,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 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,1,N,N\)]) – \(\nabla^2_{\bf a}\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- class TransportMaps.Maps.Functionals.AnchoredIntegratedSquaredParametricFunctionalBase.IntegratedSquaredParametricFunctionApproximation(*args, **kwargs)[source]¶
Bases:
AnchoredIntegratedSquaredParametricFunctional
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
.