lv_sens.main
Main: run a sensitivity analysis of the Lotka-Volterra equations.
Functions
|
Compare the adjoint-based gradient with a finite difference approximation. |
|
Generate measurement data from a ground truth forward solution. |
Return arguments parser. |
|
|
Main function. |
- lv_sens.main.compare_gradient_fd(theta: ndarray[Any, dtype[float64]], x_data: ndarray[Any, dtype[float64]], dt: float, N: float, x0: ndarray[Any, dtype[float64]]) None [source]
Compare the adjoint-based gradient with a finite difference approximation.
- Parameters:
theta – parameters at which to evaluate gradient
x_data – data array
dt – time step
N – number of time steps
x0 – initial guess
- lv_sens.main.generate_data(theta: ndarray[Any, dtype[float64]], dt: float, N: int, x0: ndarray[Any, dtype[float64]], noise_std: float, plot: bool = False) ndarray[Any, dtype[float64]] [source]
Generate measurement data from a ground truth forward solution.
- Parameters:
theta – parameter for reference solution
dt – time step
N – number of time steps
x0 – initial guess
noise_std – noise standard deviation
plot – toggle to plot solution and data points
- Returns:
data array