TransportMaps.Maps.Functionals.ParametricFunctionalBase

Module Contents

Classes

ParametricFunctional

Abstract class for parametric approximation \(f_{\bf a}:\mathbb{R}^d\rightarrow\mathbb{R}\) of \(f:\mathbb{R}^d\rightarrow\mathbb{R}\).

ParametricFunctionApproximation

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 get_identity_coeffs()[source]
abstract get_default_init_values_regression()[source]
regression_callback(xk)[source]
regression_nominal_coeffs()[source]
abstract init_coeffs()[source]

[Abstract] Initialize the coefficients \({\bf a}\)

get_n_coeffs()[source]
get_coeffs()[source]
_set_coeffs(coeffs)[source]
set_coeffs(coeffs)[source]
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 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].

  • 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 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].

  • 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 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].

  • 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 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].

  • 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