TransportMaps.Distributions.TransportMapDistributionBase

Module Contents

Classes

TransportMapDistribution

Abstract class for distributions of the transport map type (\(T^\sharp \pi\) or \(T_\sharp \pi\))

class TransportMaps.Distributions.TransportMapDistributionBase.TransportMapDistribution(transport_map: TransportMaps.Maps.TransportMap, base_distribution: TransportMaps.Distributions.DistributionBase.Distribution)[source]

Bases: TransportMaps.Distributions.DistributionBase.Distribution

Abstract class for distributions of the transport map type (\(T^\sharp \pi\) or \(T_\sharp \pi\))

See also

PushForwardTransportMapDistribution and PullBackTransportMapDistribution.

get_ncalls_tree(indent='')[source]
get_nevals_tree(indent='')[source]
get_teval_tree(indent='')[source]
update_ncalls_tree(obj)[source]
update_nevals_tree(obj)[source]
update_teval_tree(obj)[source]
reset_counters()[source]
rvs(m, mpi_pool=None, batch_size=None)[source]

Generate \(m\) samples from the distribution.

Parameters:
  • m (int) – number of samples to generate

  • mpi_pool (mpi_map.MPI_Pool) – pool of processes

  • batch_size (int) – whether to generate samples in batches

Returns:

(ndarray [\(m,d\)]) – \(m\)

\(d\)-dimensional samples

quadrature(qtype, qparams, mass=1.0, mpi_pool=None, **kwargs)[source]

Generate quadrature points and weights.

Parameters:
  • qtype (int) – quadrature type number. The different types are defined in the associated sub-classes.

  • qparams (object) – inputs necessary to the generation of the selected quadrature

  • mass (float) – total mass of the quadrature (1 for probability measures)

  • mpi_pool (mpi_map.MPI_Pool) – pool of processes

Returns:

(tuple (ndarray [\(m,d\)],

ndarray [\(m\)])) – list of quadrature points and weights

adaptive_quadrature(qtype, qparams, mass=1.0, mpi_pool=None, **kwargs)[source]
abstract map_samples_base_to_target(x, mpi_pool=None)[source]

[Abstract] Map input samples (assumed to be from \(\pi\)) to the corresponding samples from \(T^\sharp \pi\) or \(T_\sharp \pi\).

Parameters:
  • x (ndarray [\(m,d\)]) – input samples

  • mpi_pool (mpi_map.MPI_Pool) – pool of processes

Returns:

(ndarray [\(m,d\)]) – corresponding samples

abstract map_samples_target_to_base(x, mpi_pool=None)[source]

[Abstract] Map input samples (assumed to be from \(T^\sharp \pi\) or \(T_\sharp \pi\)) to the corresponding samples from \(\pi\).

Parameters:
  • x (ndarray [\(m,d\)]) – input samples

  • mpi_pool (mpi_map.MPI_Pool) – pool of processes

Returns:

(ndarray [\(m,d\)]) – corresponding samples

static _evaluate_log_transport(lpdf, ldgx)[source]
static _evaluate_grad_x_log_transport(gxlpdf, gx, gxldgx)[source]