predict()#

ParametricContinuousModel.predict(parameter, state0, t, input_func=None, **options)#

Solve the system of ordinary differential equations. This method wraps scipy.integrate.solve_ivp().

Parameters:
parameter(p,) ndarray

Parameter value \(\bfmu\).

state0(r,) ndarray

Initial state vector.

t(nt,) ndarray

Time domain over which to integrate the model.

input_funccallable or (m, nt) ndarray

Input as a function of time (preferred) or the input values at the times t. If given as an array, cubic spline interpolation on the known data points is used as needed.

options

Arguments for scipy.integrate.solve_ivp(). Common options:

  • method : str ODE solver for the model.

    • 'RK45' (default): Explicit Runge–Kutta method of order 5(4).

    • 'RK23': Explicit Runge–Kutta method of order 3(2).

    • 'Radau': Implicit Runge–Kutta method of the Radau IIA family of order 5.

    • 'BDF': Implicit multi-step variable-order (1 to 5) method based on a backward differentiation formula for the derivative.

    • 'LSODA': Adams/BDF method with automatic stiffness detection and switching.

  • max_step : float Maximimum allowed integration step size.

Returns:
states(r, nt) ndarray

Computed solution to the system over the time domain t.

Notes

For repeated predict() calls with the same parameter value, use evaluate() to first get the nonparametric model corresponding to the parameter value.