TransportMaps.Distributions.ParametricDistributionBase
¶
Module Contents¶
Classes¶
Parametric distribution \(\pi_{\bf a}\). |
- class TransportMaps.Distributions.ParametricDistributionBase.ParametricDistribution(dim)[source]¶
Bases:
TransportMaps.Distributions.DistributionBase.Distribution
Parametric distribution \(\pi_{\bf a}\).
- abstract property coeffs[source]¶
[Abstract] Get the coefficients \({\bf a}\) of the distribution
- Returns:
(
ndarray
[\(N\)]) – coefficients- Raises:
NotImplementedError – the method needs to be defined in the sub-classes
- abstract property n_coeffs[source]¶
[Abstract] Get the number \(N\) of coefficients
- Returns:
(int) – number of coefficients.
- Raises:
NotImplementedError – the method needs to be defined in the sub-classes
- abstract grad_a_log_pdf(x, *args, **kwargs)[source]¶
[Abstract] Evaluate \(\nabla_{\bf a} \log \pi({\bf x})\)
- Parameters:
- Returns:
(
ndarray
[\(m,N\)]) – \(\nabla_{\bf a} \log \pi({\bf x})\)- Raises:
NotImplementedError – the method needs to be defined in the sub-classes
- tuple_grad_a_log_pdf(x, params=None, idxs_slice=slice(None, None, None), cache=None)[source]¶
[Abstract] Evaluate \(\left(\log \pi({\bf x}), \nabla_{\bf a} \log \pi({\bf x})\right)\)
- Parameters:
- Returns:
(
tuple
) – \(\left(\log \pi({\bf x}), \nabla_{\bf a} \log \pi({\bf x})\right)\)- Raises:
NotImplementedError – the method needs to be defined in the sub-classes
- abstract hess_a_log_pdf(x, *args, **kwargs)[source]¶
[Abstract] Evaluate \(\nabla^2_{\bf a} \log \pi({\bf x})\)
- Parameters:
- Returns:
(
ndarray
[\(m,N\)]) – \(\nabla^2_{\bf a} \log \pi({\bf x})\)- Raises:
NotImplementedError – the method needs to be defined in the sub-classes
- abstract action_hess_a_log_pdf(x, da, *args, **kwargs)[source]¶
[Abstract] Evaluate \(\langle \nabla^2_{\bf a} \log \pi({\bf x}), \delta{\bf a}\rangle\)
- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsda (
ndarray
[\(N\)]) – direction on which to evaluate the Hessianparams (dict) – parameters
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]
.
- Returns:
(
ndarray
[\(m,N\)]) – \(\nabla^2_{\bf a} \log \pi({\bf x})\)- Raises:
NotImplementedError – the method needs to be defined in the sub-classes