PerturbedStepSolver

class probnum.diffeq.PerturbedStepSolver(rng, solver, noise_scale, perturb_function)[source]

Bases: probnum.diffeq.ODESolver

ODE-Solver random perturbatino of the step-sizes.

Perturbs the steps accordingly and projects the solution back to the originally proposed time points. Proposed by Abdulle and Garegnani (2020) 1.

Parameters
  • rng (Generator) – Random number generator.

  • solver (WrappedScipyRungeKutta) – Currently this has to be a Runge-Kutta method based on SciPy.

  • noise-scale – Scales the amount of noise that is introduced.

  • perturb_function (Callable) – Defines how the stepsize is distributed. This can be either one of perturb_lognormal() or perturb_uniform() or any other perturbation function with the same signature.

References

1

Abdulle, A. and Garegnani, G. Random time step probabilistic methods for uncertainty quantification in chaotic and geometric numerical integration. Statistics and Computing. 2020.

Methods Summary

initialise()

Initialise and reset the solver.

method_callback(time, current_guess, …)

Call dense output after each step and store the interpolants.

postprocess(odesol)

Process the ODESolution object before returning.

rvlist_to_odesol(times, rvs)

Create an ODESolution object.

solution_generator(steprule)

Generate ODE solver steps.

solve(steprule)

Solve an IVP.

step(start, stop, current, **kwargs)

Perturb the original stopping point.

Methods Documentation

initialise()[source]

Initialise and reset the solver.

method_callback(time, current_guess, current_error)[source]

Call dense output after each step and store the interpolants.

postprocess(odesol)[source]

Process the ODESolution object before returning.

rvlist_to_odesol(times, rvs)[source]

Create an ODESolution object.

solution_generator(steprule)

Generate ODE solver steps.

solve(steprule)

Solve an IVP.

Parameters

steprule (StepRule) – Step-size selection rule, e.g. constant steps or adaptive steps.

step(start, stop, current, **kwargs)[source]

Perturb the original stopping point.

Perform one perturbed step and project the solution back to the original stopping point.

Parameters
  • start (float) – starting location of the step

  • stop (float) – stopping location of the step

  • current (list of RandomVariable) – current state of the ODE.

Returns

  • random_var (randvars.RandomVariable) – Estimated states of the discrete-time solution.

  • error_estimation (float) – estimated error after having performed the step.