ExpectationProblem

SciMLExpectations.ExpectationProblemType
ExpectationProblem(S, g, h, d, params)
ExpectationProblem(g, d, params; nout = nothing)
ExpectationProblem(sm::SystemMap, g, h, d; nout = nothing)
ExpectationProblem(sm::ProcessNoiseSystemMap, g, h; nout = nothing)

Represent an expectation of an observable over an uncertainty distribution.

An ExpectationProblem defines the data needed to compute an integral of the form integral g(S(u, p), p) * pdf(d, x) dx, where h(x, u0, p) maps uncertain inputs into initial conditions and parameters for the system map S. The function-only constructor uses identity maps for S and h.

Arguments

  • S: System map called as S(u, p).
  • g: Observable called as g(u, p) for function problems or g(sol, p) for system maps.
  • h: Covariate map called as h(x, u0, p).
  • d: Distribution of uncertain inputs. It must support the operations needed by the chosen expectation algorithm, such as pdf, rand, and extrema.
  • params: Parameters passed to the observable and integration problem.
  • sm: A SystemMap or ProcessNoiseSystemMap.
  • nout: Deprecated and unused.

Fields

  • S: Stored system map.
  • g: Stored observable.
  • h: Stored covariate map.
  • d: Stored uncertainty distribution.
  • params: Stored parameters.

Returns

An ExpectationProblem that can be solved with solve(prob, Koopman()) or solve(prob, MonteCarlo(trajectories)).

source
SciMLExpectations.SystemMapType
SystemMap(prob; kwargs...)
SystemMap(prob, alg; kwargs...)
SystemMap(prob, alg, ensemblealg; kwargs...)

Represent the deterministic solution map S(u0, p) for a SciML problem.

Calling a SystemMap remakes prob with the supplied initial condition and parameters, then solves the remade problem.

Arguments

  • prob: SciML problem used as the template for repeated solves.
  • alg: Solver algorithm. If omitted, solve is called without an explicit algorithm.
  • ensemblealg: Ensemble algorithm used by ensemble-based expectation solves. Defaults to EnsembleThreads().
  • kwargs...: Keyword arguments forwarded to solve.

Fields

  • prob: Stored SciML problem.
  • alg: Stored solver algorithm or nothing.
  • ensemblealg: Stored ensemble algorithm.
  • kwargs: Stored solver keyword arguments.

Returns

A callable SystemMap.

source
SciMLExpectations.ProcessNoiseSystemMapType
ProcessNoiseSystemMap(prob, n, args...; kwargs...)

Represent a solution map for an SDE whose process noise is parameterized by uncertain expansion coefficients.

Calling a ProcessNoiseSystemMap remakes prob with a Kosambi-Karhunen-Loeve process-noise representation determined by the sampled coefficients and then solves the remade problem.

Arguments

  • prob: SciML problem used as the template for repeated solves.
  • n: Number of expansion terms in the process-noise representation.
  • args...: Positional arguments forwarded to solve.
  • kwargs...: Keyword arguments forwarded to solve.

Fields

  • prob: Stored SciML problem.
  • n: Stored number of expansion terms.
  • args: Stored solver positional arguments.
  • kwargs: Stored solver keyword arguments.

Returns

A callable ProcessNoiseSystemMap.

source
SciMLExpectations.GenericDistributionType
GenericDistribution(pdf_func, rand_func, lb, ub)
GenericDistribution(d::Distributions.Sampleable, ds...)

Represent a distribution by its density, sampler, and integration bounds.

GenericDistribution can be used for arbitrary joint densities and for products of sampleable distributions. The Distributions.Sampleable constructor builds a joint density from independent one-dimensional distributions without relying on Distributions.Product.

Arguments

  • pdf_func: Function called as pdf_func(x) to evaluate the density.
  • rand_func: Zero-argument function that returns one sample.
  • lb: Lower integration bound.
  • ub: Upper integration bound.
  • d, ds...: Independent sampleable distributions used to build a joint distribution.

Fields

  • pdf_func: Stored density function.
  • rand_func: Stored sampler.
  • lb: Stored lower bound.
  • ub: Stored upper bound.

Returns

A distribution-like object supporting pdf, rand, minimum, maximum, and extrema.

source