
This Jupyter Notebook describes an example of fitting a function to a set of observations. A quantity y is known to depend on another quantity x. A set of corresponding values have been collected for y and x. We want to identify a function of x that explains the values of y. This problem is formulated as a linear programming problem using the Gurobi Python API and solved with the Gurobi Optimizer.
This model is example 11 from the fifth edition of Model Building in Mathematical Programming, by H. Paul Williams on pages 266 and 319-320.
This modeling example is at the beginner level, where we assume that you know Python and that you have some knowledge about building mathematical optimization models. The reader should also consult the documentation of the Gurobi Python API.
Request a Gurobi Evaluation License or Free Academic License
Modeling examples are coded using the Gurobi Python API in Jupyter Notebook. In order to use the Jupyter Notebooks, you must have a Gurobi License. If you do not have a license, you can request an Evaluation License as a Commercial User or download a free license as an Academic User.
Commercial Users: Free Evaluation Version Academic Users: Free Academic Version
Access the Jupyter Notebook Modeling Example
Click on the button below to be directed to GitHub where you can download the repository for the Curve Fitting Jupyter Notebook modeling example.
Curve Fitting