TransportMaps.Algorithms.Adaptivity

Classes

Inheritance diagram of TransportMaps.Algorithms.Adaptivity.Builder, TransportMaps.Algorithms.Adaptivity.KullbackLeiblerBuilder, TransportMaps.Algorithms.Adaptivity.SequentialKullbackLeiblerBuilder, TransportMaps.Algorithms.Adaptivity.ToleranceSequentialKullbackLeiblerBuilder, TransportMaps.Algorithms.Adaptivity.FirstVariationKullbackLeiblerBuilder, TransportMaps.Algorithms.Adaptivity.L2RegressionBuilder, TransportMaps.Algorithms.Adaptivity.ToleranceSequentialL2RegressionBuilder
Class Description
Builder [Abstract] Basis builder class.
KullbackLeiblerBuilder Basis builder through minimization of kl divergence
SequentialKullbackLeiblerBuilder Solve over a list of maps, using the former to warm start the next one
ToleranceSequentialKullbackLeiblerBuilder Solve over a list of maps, using the former to warm start the next one, until a target tolerance is met
FirstVariationKullbackLeiblerBuilder Adaptive builder based on the first variation of the kl divergence
L2RegressionBuilder Basis builder through \(\mathcal{L}^2\) regression
ToleranceSequentialL2RegressionBuilder  

Documentation

class TransportMaps.Algorithms.Adaptivity.Builder[source]

[Abstract] Basis builder class.

Provides a :fun:`solve` for constructing a transport map

class TransportMaps.Algorithms.Adaptivity.KullbackLeiblerBuilder(base_distribution, target_distribution, transport_map, solve_params, validator=None, callback=None, callback_kwargs={}, verbosity=0)[source]

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.

Parameters:
  • base_distribution (Distribution) – distribution \(\nu_\rho\)
  • target_distribution (Distribution) – distribution \(\nu_\pi\)
  • transport_map (TransportMap) – transport map \(T\)
  • solve_params (dict) – dictionary of parameters for solution
  • validator (Validator) – validator to be used to check stability of the solution
  • callback (function) – function taking a map and optional additional arguments which is called whenever it is deemed necessary by the chosen algorithm (e.g. for storing purposes)
  • callback_kwargs (dict) – additional arguments to be provided to the function callback.
  • verbosity (int) – level of verbosity of the builder
solve(reloading=False)[source]
Returns:(TransportMaps.Maps.TransportMap) – the transport map fitted.
class TransportMaps.Algorithms.Adaptivity.SequentialKullbackLeiblerBuilder(base_distribution, target_distribution, transport_map_list, solve_params_list, validator=None, regression_params_list=None, callback=None, callback_kwargs={}, verbosity=0)[source]

Solve over a list of maps, using the former to warm start the next one

Given distribution \(\nu_\rho\) and \(\nu_\pi\), and the list of parametric transport maps \([T_1[{\bf a}_1,\ldots,T_n[{\bf a}_n]\), provides the functionalities to solve the problems

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

up to a chosen tolerance, where the numerical solution for map \(T_{i+1}\) is started at \(T_i\)

Parameters:
  • base_distribution (Distribution) – distribution \(\nu_\rho\)
  • target_distribution (Distribution) – distribution \(\nu_\pi\)
  • transport_map_list (list of TransportMap) – list of transports map \(T_i\)
  • solve_params_list (list of dict) – list of dictionaries of parameters for solution
  • validator (Validator) – validator to be used to check stability of the solution
  • regression_params_list (list of dict) – list of dictionaries of parameters for the regression between \(T_i\) and \(T_{i+1}\)
  • verbosity (int) – level of verbosity of the builder
solve(reloading=False)[source]
Returns:(TransportMaps.Maps.TransportMap) – the last transport map fitted.
class TransportMaps.Algorithms.Adaptivity.ToleranceSequentialKullbackLeiblerBuilder(base_distribution, target_distribution, transport_map_list, solve_params_list, validator=None, tol=0.01, var_diag_params=None, laplace_pull=False, callback=None, callback_kwargs={}, verbosity=0)[source]

Solve over a list of maps, using the former to warm start the next one, until a target tolerance is met

Given distribution \(\nu_\rho\) and \(\nu_\pi\), and the list of parametric transport maps \([T_1[{\bf a}_1,\ldots,T_n[{\bf a}_n]\), provides the functionalities to solve the problems

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

up to a chosen tolerance, where the numerical solution for map \(T_{i+1}\) is started at \(T_i\)

Parameters:
  • base_distribution (Distribution) – distribution \(\nu_\rho\)
  • target_distribution (Distribution) – distribution \(\nu_\pi\)
  • transport_map_list (list of TransportMap) – list of transports map \(T_i\)
  • solve_params_list (list of dict) – list of dictionaries of parameters for solution
  • regression_params_list (list of dict) – list of dictionaries of parameters for the regression between \(T_i\) and \(T_{i+1}\)
  • validator (Validator) – validator to be used to check stability of the solution
  • tol (float) – target variance diagnostic tolerance
  • var_diag_params (dict) – parameters to be used in the variance diagnostic approximation
  • callback (function) – function taking a map and optional additional arguments which is called whenever it is deemed necessary by the chosen algorithm (e.g. for storing purposes)
  • callback_kwargs (dict) – additional arguments to be provided to the function callback.
  • verbosity (int) – level of verbosity of the builder
solve(reloading=False)[source]
Returns:(TransportMaps.Maps.TransportMap) – the last transport map fitted.
class TransportMaps.Algorithms.Adaptivity.FirstVariationKullbackLeiblerBuilder(base_distribution, target_distribution, transport_map, validator, eps_bull, regression_builder=None, solve_params={}, line_search_params={}, max_it=20, use_fv_hess=False, prune_trunc=0.01, avar_trunc=0.1, coeff_trunc=0.01, callback=None, callback_kwargs={}, verbosity=0)[source]

Adaptive builder based on the first variation of the 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) = \arg\min_{\bf a}\underbrace{\mathbb{E}_\rho\left[ -\log T[{\bf a}]^\sharp\pi \right]}_{ \mathcal{J}[T]({\bf x})}\]

up to a chosen tolerance, by enriching the map using information from the first variation

\[\nabla\mathcal{J}[T]({\bf x}) = (\nabla_{\bf x}T)^{-\top} \left(\log\frac{\rho({\bf x})}{T^\sharp\pi({\bf x})}\right)\]
Parameters:
  • base_distribution (Distribution) – distribution \(\nu_\rho\)
  • target_distribution (Distribution) – distribution \(\nu_\pi\)
  • transport_map (TransportMap) – starting transport map \(T\)
  • validator (Validator) – validator to be used to check stability of the solution
  • eps_bull (float) – target tolerance of variance diagnostic
  • solve_params (dict) – dictionary of parameters for solution
  • callback (function) – function taking a map and optional additional arguments which is called whenever it is deemed necessary by the chosen algorithm (e.g. for storing purposes)
  • callback_kwargs (dict) – additional arguments to be provided to the function callback.
  • verbosity (int) – level of verbosity of the builder
solve(reloading=False)[source]

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

class TransportMaps.Algorithms.Adaptivity.L2RegressionBuilder(regression_params)[source]

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
class TransportMaps.Algorithms.Adaptivity.ToleranceSequentialL2RegressionBuilder(eps, regression_params_list, monitor_params)[source]