Gaussian data |
|
Data (matrix or 'csv'). |
Performs a regression
from given data to adjust a parabola to them.
(This is a paradigm exercise in regression to test Python library.)
The default data are Gaussian (from μ = 5,
σ = 0.8), but any other data can be used.
Files involved:
P-gaussToParab.php (this one),
GaussToParab.php,
gaussToParab.py.
Advantage is taken from: PHP,
for the web page; and Python for the numerical segment;
and 'gnuplot', for plotting.
Draws a plot of the original and the adjusted data.
Computation structure — A PHP file
(this page: 'P-GaussToParab.php') calls (via
'action=...') an intermediate PHP file ('GaussToParab.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.
Keywords: PHP, command line arguments,
Python script, gnuplot. |