©
Curve fitting in dependent functions
Uses Python 'minimize' in a system of functions.
2024.Jul.03 19:22:44
File to upload (Optional) Such as dataFitFuncs.xlsx (table of data)
Data table Data (matrix or 'csv').
Initial guesses Initial guesses for the parameters sought.
Mode   Mode of computation.
Show values Show graph coordinates.

Performs a regression from given data ('Data table' or Excel), to find the underlying parameters in a set of multiple functions of a single variable.

The functions are y1 = a x + b and y2 = a x² + b x + c, and the parameters to be determined by fitting are, obviously, a, b and c.

This is an application of the Python 'minimize' function, in the 'scipy.optimize' module, a part of the Python 'SciPy' library.

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-fitFuncs.php') calls (via 'action=...') an intermediate PHP file ('FitFuncs.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.

Files involved: P-curFitODE.php (this one), CurFitODE.php, curFitODE.py.

Keywords: PHP, command line arguments, Python script, gnuplot.

References: Plate: CurveFitUniMult

• (Wikipedia) PHP (from Personal Home Page)

• Python curve_fit [in Optimization and root finding (scipy.optimize)], accessed 25-Oct-2023.

• 1656-11-08: Halley, Edmond (†1742-01-14, 85 yrs.) (-258 yrs. Dantzig)

 
 
Valid HTML 5! IST http://web.ist.utl.pt/~ist11038/compute/explore/Yetminimize/P-fitFuncs.php
Created: 2023-11-08 — Last modified: 2024-06-18