Performs
a regression from given data ('Data table' or Excel), to find
the underlying parameters (here, n = 4)
in a set of multiple (here, 3) functions of a single
variable (t, as usual).
The embedded 3 ODE's
can be seen here.
For ease of use, an Excel file is provided
(same data) that can be downloaded and uploaded with other data.
This is an application of the Python
'minimize' function, in the 'scipy.optimize' module, a part of the
Python 'SciPy' library.
Draws: a plot of the original and
the adjusted data; and a plot of the residuals.
Computation structure — A PHP file
(this page: 'P-invSIR.php') calls (via
'action=...') an intermediate PHP file ('InvSIR.php'), which
(through $_POST) sends the problem data as command line arguments to
a Python script. This last does the computing, and makes
'system' call(s) to 'gnuplot', for the final (temporary) webpage.
Advantage is taken from: PHP,
for the web page; Python for the numerical segment;
and 'gnuplot', for plotting.
Files involved:
P-invFIT.php (this one),
InvSIR.php,
invSIR.py.
Keywords: SIR model, PHP,
command line arguments, Python script, gnuplot. |