TransportMaps.Maps.Functionals.ProductDistributionParametricPullbackComponentFunctionBase
¶
Module Contents¶
Classes¶
Parametric function \(f[{\bf a}](x_{1:k}) = \log\pi\circ T_k[{\bf a}](x_{1:k}) + \log\partial_{x_k}T_k[{\bf a}](x_{1:k})\) |
- class TransportMaps.Maps.Functionals.ProductDistributionParametricPullbackComponentFunctionBase.ProductDistributionParametricPullbackComponentFunction(transport_map_component, base_distribution)[source]¶
Bases:
TransportMaps.Maps.Functionals.ParametricFunctionalBase.ParametricFunctional
Parametric function \(f[{\bf a}](x_{1:k}) = \log\pi\circ T_k[{\bf a}](x_{1:k}) + \log\partial_{x_k}T_k[{\bf a}](x_{1:k})\)
- Parameters:
transport_map_component (MonotonicFunctionApproximation) – component \(T_k\) of monotone map \(T\)
base_distribution (Distribution) – distribution \(\pi\)
- property coeffs[source]¶
Get the coefficients \({\bf a}\) of the function
See also
ParametricFunctionApproximation.coeffs()
- property n_coeffs[source]¶
Get the number \(N\) of coefficients
See also
ParametricFunctionApproximation.n_coeffs()
- evaluate(x, params={}, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(f[{\bf a}](x_{1:k})\)
- Parameters:
x (
ndarray
[\(m,k\)]) – evaluation pointsparams (dict) – parameters with keys
params_pi
,params_t
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 matchx.shape[0]
.cache (dict) – cached values
- Returns:
(
ndarray
[\(m,1\)]) – evaluations
- grad_a(x, params={}, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla_{\bf a}f[{\bf a}](x_{1:k})\)
- Parameters:
x (
ndarray
[\(m,k\)]) – evaluation pointsparams (dict) – parameters with keys
params_pi
,params_t
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 matchx.shape[0]
.cache (dict) – cached values
- Returns:
(
ndarray
[\(m,1,n\)]) – evaluations
- hess_a(x, params={}, idxs_slice=slice(None), cache=None)[source]¶
Evaluate \(\nabla^2_{\bf a}f[{\bf a}](x_{1:k})\)
- Parameters:
x (
ndarray
[\(m,k\)]) – evaluation pointsparams (dict) – parameters with keys
params_pi
,params_t
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 matchx.shape[0]
.cache (dict) – cached values
- Returns:
(
ndarray
[\(m,1,n,n\)]) – evaluations
- grad_x(x, params={}, idxs_slice=slice(None))[source]¶
Evaluate \(\nabla_{\bf x} \log T_{k}^\sharp \pi({\bf x_{1:k}})\)
- Parameters:
- Returns:
- (
ndarray
[\(m,1,k\)]) – values of \(\nabla_{\bf x} \log T_{k}^\sharp \pi\) at the
x
points.
- (
- hess_x(x, params={}, idxs_slice=slice(None))[source]¶
Evaluate \(\nabla^2_{\bf x} \log T_{k}^\sharp \pi({\bf x_{1:k}})\)
- Parameters:
- Returns:
- (
ndarray
[\(m,1,k,k\)]) – values of \(\nabla^2_{\bf x} \log T_{k}^\sharp \pi\) at the
x
points.
- (