PolyFlows

Documentation for PolyFlows.

Exported functions

PolyFlows.EulerSampleIntegratorMethod
EulerSampleIntegrator(ScalarType, dims...)

Integrator for Euler scheme that uses state of dimension (dims...). Space complexity: prod(dims...)

source
PolyFlows.LinearInterpolantType
LinearInterpolant(α, β, α̇, β̇, [tol], [η, α̇/α])

Forms the linear interpolant $X_t = \alpha(t) X_1 + \beta(t) X_0$. See [1] for definition of $\eta$.

source
PolyFlows.RK4SampleIntegratorMethod
RK4SampleIntegrator(ScalarType, dims...)

Integrator for Runge-Kutta 4 scheme that uses state of dimension (dims...). Space complexity: 3prod(dims...)

source
PolyFlows.create_LS_stoch_interpMethod
create_LS_stoch_interp(data::AbstractMatrix, basis::MultivariateBasis, fmset::FixedMultiIndexSet, 
interp::AbstractStochInterpolant, time_pts, time_wts; [rng])

Create a least-squares system for the stochastic interpolant.

If N=length(fmset), then this returns a NxN matrix and a Nxd vector, where d is the dimension of the state (keeping in mind that fmset is d+1 dimensional)

Arguments

  • data (M,d) samples drawn from target
  • basis (d+1) basis for the space variables concatenated with time basis
  • fmset (N,d+1) set of multi-indices
  • interp stochastic interpolant
  • time_pts (T) set of points to integrate loss over in time
  • time_wts (T) set of weights for time integration rule. Defaults to uniform.
  • [rng] (optional) RNG from Random
source

Private functions

PolyFlows.initialize_interpolant_spacesMethod
initialize_interpolant_spaces(data::AbstractMatrix{T}, fmset::FixedMultiIndexSet{dim_x_t}, rng)

Create spaces for storing intermediate results for learning the stochastic interpolant.

source
PolyFlows.state_and_velocity!Method
state_and_velocity!(state, velocity, data, noise, interp, time)

Get $X_t = \alpha(t) X_1 + \beta(t) X_0$ as well as $\dot{X}_t$, where $X_1$ is drawn from the target and $X_0$ from the reference.

Output results into state and velocity.

Arguments

  • state: Matrix (M, d+1) for $(X_t, t)$, i.e., augmenting the state with the time
  • velocity: Matrix (M, d) for $\dot{X}_t$
  • data: Matrix (M, d) for $X_1$
  • noise: Matrix (M, d) for $X_0$
  • interp::LinearInterpolation
  • time::Number
source
PolyFlows.velocity_basis_eval_step!Method
velocity_basis_eval_step!(full_eval_space, univariate_eval_space, basis, fmset, state)

Evaluate $\{\Phi(X_t^{(j)},t)\}_{j=1}^M\subset \mathbb{R}^{N}$ for fixed $t$. Note that state should be $\{(X_t^{(j)},t)\}$, i.e., augmented with the time pt, so dimension is d+1

Arguments

  • full_eval_space: Matrix (N,M)
  • univariate_eval_space::NTuple{d+1}: Each matrix is (p_j,M), where p_j is the maximum degree of basis function in dim j
  • basis::MultivariateBasis{d+1}
  • fmset::FixedMultiIndex{d+1}
  • state Matrix (M,d+1)
source