PolyFlows
Documentation for PolyFlows.
PolyFlows.EulerSampleIntegrator
PolyFlows.LinearInterpolant
PolyFlows.RK4SampleIntegrator
PolyFlows.McCannInterpolant
PolyFlows.SqrtInterpolant
PolyFlows.SquareInterpolant
PolyFlows.TrigInterpolant
PolyFlows.create_LS_stoch_interp
PolyFlows.initialize_interpolant_spaces
PolyFlows.state_and_velocity!
PolyFlows.velocity_basis_eval_step!
Exported functions
PolyFlows.EulerSampleIntegrator
— MethodEulerSampleIntegrator(ScalarType, dims...)
Integrator for Euler scheme that uses state of dimension (dims...). Space complexity: prod(dims...)
PolyFlows.LinearInterpolant
— TypeLinearInterpolant(α, β, α̇, β̇, [tol], [η, α̇/α])
Forms the linear interpolant $X_t = \alpha(t) X_1 + \beta(t) X_0$. See [1] for definition of $\eta$.
PolyFlows.RK4SampleIntegrator
— MethodRK4SampleIntegrator(ScalarType, dims...)
Integrator for Runge-Kutta 4 scheme that uses state of dimension (dims...). Space complexity: 3prod(dims...)
PolyFlows.McCannInterpolant
— MethodSee LinearInterpolant
. α = t, β = 1-t
PolyFlows.SqrtInterpolant
— FunctionSee LinearInterpolant
. α = √t, β = 1-√t
PolyFlows.SquareInterpolant
— FunctionSee LinearInterpolant
. α = t², β = 1-t²
PolyFlows.TrigInterpolant
— FunctionSee LinearInterpolant
. α = sin(πt/2), β = cos(πt/2)
PolyFlows.create_LS_stoch_interp
— Methodcreate_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 targetbasis
(d+1) basis for the space variables concatenated with time basisfmset
(N,d+1) set of multi-indicesinterp
stochastic interpolanttime_pts
(T) set of points to integrate loss over in timetime_wts
(T) set of weights for time integration rule. Defaults to uniform.[rng]
(optional) RNG from Random
Private functions
PolyFlows.initialize_interpolant_spaces
— Methodinitialize_interpolant_spaces(data::AbstractMatrix{T}, fmset::FixedMultiIndexSet{dim_x_t}, rng)
Create spaces for storing intermediate results for learning the stochastic interpolant.
PolyFlows.state_and_velocity!
— Methodstate_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 timevelocity
: 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
PolyFlows.velocity_basis_eval_step!
— Methodvelocity_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)
, wherep_j
is the maximum degree of basis function in dimj
basis::MultivariateBasis{d+1}
fmset::FixedMultiIndex{d+1}
state
Matrix (M,d+1)