TransportMaps.Maps.Functionals.IdentityParametricMonotoneFunctionalBase
¶
Module Contents¶
Classes¶
Identity functional \(\mathbb{R}\rightarrow\mathbb{R}\). |
- class TransportMaps.Maps.Functionals.IdentityParametricMonotoneFunctionalBase.IdentityParametricMonotoneFunctional[source]¶
Bases:
TransportMaps.Maps.Functionals.ParametricMonotoneFunctionalBase.ParametricMonotoneFunctional
Identity functional \(\mathbb{R}\rightarrow\mathbb{R}\).
- property n_coeffs[source]¶
[Abstract] Get the number \(N\) of coefficients \({\bf a}\)
- Returns:
(
int
) – number of coefficients
- property coeffs[source]¶
[Abstract] Get the coefficients \({\bf a}\)
- Returns:
(
ndarray
[\(N\)]) – coefficients
- precomp_evaluate(*args, **kwargs)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(f_{\bf a}\) at
x
.
- precomp_grad_x(*args, **kwargs)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\nabla_{\bf x} f_{\bf a}\) at
x
- precomp_partial_xd(*args, **kwargs)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\partial_{x_d} f_{\bf a}\) at
x
.
- precomp_grad_x_partial_xd(*args, **kwargs)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\nabla_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.
- precomp_partial2_xd(*args, **kwargs)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\partial^2_{x_d} f_{\bf a}\) at
x
.
- evaluate(x, *args, **kwargs)[source]¶
[Abstract] 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
- grad_x(x, *args, **kwargs)[source]¶
[Abstract] Evaluate \(\nabla_{\bf x} 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} f_{\bf a}({\bf x})\)
- (
- hess_x(x, *args, **kwargs)[source]¶
[Abstract] Evaluate the Hessian \(\nabla^2_{\bf x}T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).
- Parameters:
- Returns:
(
ndarray
[\(m,d_y,d_x,d_x\)]) – transformed points- Raises:
NotImplementedError – to be implemented in sub-classes
- action_hess_x(x, dx, *args, **kwargs)[source]¶
[Abstract] Evaluate the action of the Hessian \(\langle\nabla^2_{\bf x}T,\delta{\bf x}\rangle\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).
- Parameters:
x (
ndarray
[\(m,d_x\)]) – evaluation pointsdx (
ndarray
[\(m,d_x\)]) – direction on which to evaluate the Hessianprecomp (
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]
.
- Returns:
(
ndarray
[\(m,d_y,d_x\)]) – transformed points- Raises:
NotImplementedError – to be implemented in sub-classes
- partial_xd(x, *args, **kwargs)[source]¶
[Abstract] 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})\)
- (
- grad_x_partial_xd(x, *args, **kwargs)[source]¶
[Abstract] 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})\)
- (
- hess_x_partial_xd(x, *args, **kwargs)[source]¶
[Abstract] 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(x, *args, **kwargs)[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})\)
- (
- hess_a(x, *args, **kwargs)[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})\)
- (
- grad_a_partial_xd(x, *args, **kwargs)[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})\)
- (
- hess_a_partial_xd(x, *args, **kwargs)[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})\)
- (