TransportMaps.Maps.Functionals.ParametricFunctionalBase
¶
Module Contents¶
Classes¶
Abstract class for parametric approximation \(f_{\bf a}:\mathbb{R}^d\rightarrow\mathbb{R}\) of \(f:\mathbb{R}^d\rightarrow\mathbb{R}\). |
|
Abstract class for parametric approximation \(f_{\bf a}:\mathbb{R}^d\rightarrow\mathbb{R}\) of \(f:\mathbb{R}^d\rightarrow\mathbb{R}\). |
- class TransportMaps.Maps.Functionals.ParametricFunctionalBase.ParametricFunctional(dim)[source]¶
Bases:
TransportMaps.Maps.Functionals.FunctionalBase.Functional
Abstract class for parametric approximation \(f_{\bf a}:\mathbb{R}^d\rightarrow\mathbb{R}\) of \(f:\mathbb{R}^d\rightarrow\mathbb{R}\).
- Parameters:
dim (int) – number of dimensions
- abstract property n_coeffs[source]¶
[Abstract] Get the number \(N\) of coefficients \({\bf a}\)
- Returns:
(
int
) – number of coefficients
- abstract property coeffs[source]¶
[Abstract] Get the coefficients \({\bf a}\)
- Returns:
(
ndarray
[\(N\)]) – coefficients
- abstract grad_a(x, precomp=None, idxs_slice=slice(None))[source]¶
[Abstract] 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})\)
- (
- abstract hess_a(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(\nabla^2_{\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,N\)]) – \(\nabla^2_{\bf a} f_{\bf a}({\bf x})\)
- (
- abstract grad_a_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] 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})\)
- (
- abstract hess_a_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] 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.ParametricFunctionalBase.ParametricFunctionApproximation(dim)[source]¶
Bases:
ParametricFunctional
Abstract class for parametric approximation \(f_{\bf a}:\mathbb{R}^d\rightarrow\mathbb{R}\) of \(f:\mathbb{R}^d\rightarrow\mathbb{R}\).
- Parameters:
dim (int) – number of dimensions