# TransportMaps.Builders.BuilderBase¶

## Module Contents¶

### Classes¶

 Builder [Abstract] Basis builder class. L2RegressionBuilder Basis builder through $$\mathcal{L}^2$$ regression KullbackLeiblerBuilder Basis builder through minimization of kl divergence
class TransportMaps.Builders.BuilderBase.Builder[source]

[Abstract] Basis builder class.

Provides a :fun:solve for constructing a transport map

abstract solve(*args, **kwargs)[source]
class TransportMaps.Builders.BuilderBase.L2RegressionBuilder(regression_params={})[source]

Bases: Builder

Basis builder through $$\mathcal{L}^2$$ regression

Given a map $$M$$, fit a supplied parametric transport map $$T$$ through the solution of the $$\mathcal{L}^2$$ regression problem

$\arg\min_{\bf a}\left\Vert M - T \right\Vert_{\mathcal{L}^2} + \alpha \Vert {\bf a} \Vert_x$

where $$\alpha\Vert{\bf a}\Vert_x$$ is a regularization term, with respect to one of the available norms.

Parameters:

regression_params (dict) – dictionary of regression parameters

solve(transport_map, target_map, **extra_reg_params)[source]
class TransportMaps.Builders.BuilderBase.KullbackLeiblerBuilder(validator=None, callback=None, callback_kwargs={}, verbosity=0, interactive=False)[source]

Bases: Builder

Basis builder through minimization of kl divergence

Given distribution $$\nu_\rho$$ and $$\nu_\pi$$, and the parametric transport map $$T[{\bf a}]$$, provides the functionalities to solve the problem

$\arg\min_{\bf a}\mathcal{D}_{\rm KL}\left( T[{\bf a}]_\sharp\rho \Vert \pi\right)$

up to a chosen tolerance.

__getstate__()[source]
__setstate__(state)[source]
solve(transport_map=None, base_distribution=None, target_distribution=None, solve_params=None, state=None, mpi_pool=None)[source]
Args
transport_map (TransportMap):

transport map $$T$$

base_distribution (Distribution):

distribution $$\nu_\rho$$

target_distribution (Distribution):

distribution $$\nu_\pi$$

solve_params (dict): dictionary of parameters for solution state (TransportMaps.DataStorageObject):

if provided, it must contain all the information needed for reloading, or a handle to an empty storage object which can be externally stored. If state contains the keys corresponding to arguments to this function, they will be used instead of the input themselves.

Returns:

(TransportMaps.Maps.TransportMap) – the transport map fitted.