[Paper Review] PyGOM - A Python Package for Simplifying Modelling with Systems of Ordinary Differential Equations
PyGOM is a free, open-source Python package that simplifies the development, analysis, and simulation of systems of ordinary differential equations (ODEs) through an intuitive, mathematically intuitive interface. It enables rapid model prototyping, parameter estimation with confidence intervals, stochastic simulation, and R₀ calculation, all while automating algebraic and numerical computations to let users focus on model design and domain-specific insights.
Ordinary Differential Equations (ODE) are used throughout science where the capture of rates of change in states is sought. While both pieces of commercial and open software exist to study such systems, their efficient and accurate usage frequently requires deep understanding of mathematics and programming. The package we present here, PyGOM, seeks to remove these obstacles for models based on ODE systems. We provide a simple interface for the construction of such systems backed by a comprehensive and easy to use tool--box. This tool--box implements functions to easily perform common operations for ODE systems such as solving, parameter estimation, and stochastic simulation. The package source is freely available and organized in a way that permits easy extension. With both the algebraic and numeric calculations performed automatically (but still accessible), the end user is freed to focus on model development.
Motivation & Objective
- To address the steep learning curve and complexity of building and analyzing ODE-based models in scientific research.
- To enable rapid, rigorous validation of published ODE models during disease outbreaks, especially when source code is unavailable.
- To provide a free, extensible, and modular toolkit that supports common ODE operations such as solving, parameter fitting, and stochastic simulation.
- To reduce reliance on proprietary software by offering a high-performance, open-source alternative compatible with HPC and cloud environments.
- To support interoperability with standards like SBML and extend functionality for broader scientific use beyond epidemiology.
Proposed method
- The package uses a symbolic algebra interface via SymPy to define ODE systems in a mathematically intuitive way, closely resembling standard mathematical notation.
- It automatically performs symbolic and numeric computations, including Jacobian calculation and system decomposition into individual transitions for analysis.
- PyGOM integrates with SciPy solvers for accurate and efficient numerical solution of initial value problems (IVPs), with support for adaptive time-stepping.
- Parameter estimation is implemented using both parametric and non-parametric bootstrap methods, with confidence intervals computed via normal approximation or empirical distribution.
- Stochastic simulations are supported through built-in jump process modeling, with optional parallelization via Dask for performance scaling.
- The package supports reading and writing simple SBML files and is designed for extensibility, enabling integration with other tools and standards.
Experimental results
Research questions
- RQ1How can ODE model development be simplified for non-expert users without sacrificing mathematical rigor or computational performance?
- RQ2Can a unified, open-source Python package effectively replace proprietary ODE modeling tools in high-stakes scientific contexts like disease outbreak response?
- RQ3To what extent can automated decomposition of ODE systems into transitions improve model verification and analysis, such as R₀ calculation?
- RQ4How accurately and efficiently can parameter estimation with confidence intervals be performed in a fully accessible, high-level Python environment?
- RQ5Can a modular, extensible design allow PyGOM to scale beyond epidemiology into broader scientific modeling domains?
Key findings
- PyGOM enables rapid construction and validation of ODE models, particularly useful during disease outbreaks when source code is unavailable.
- Function evaluation performance is reduced to approximately one-quarter of pure Python code (e.g., PySCeS), thanks to runtime compilation to static code.
- The package successfully computes the basic reproduction number (R₀) by decomposing ODE systems into individual transitions, enabling direct biological interpretation.
- Parameter estimation with confidence intervals is robust, with bootstrap-based intervals showing narrower widths than parametric ones when observational error is low.
- The package supports both deterministic and stochastic simulations, with parallel execution available via Dask, enhancing scalability for large-scale modeling.
- PyGOM’s modular architecture allows seamless extension and integration with SBML and other standards, supporting long-term interoperability and community adoption.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.