This example is referring to the curve fitting problem, so we do have a set of points on a plane and,
um, we want to find out, uh, second degree, uh, expression that.
And approximates the behavior of these points in the best way.
So it means that that line should be somehow representing these points.
OK, so the input parameters are the locations of these points, let's call them and X and Y.
And the question is, what are the coefficients of this expression, A, B, C, or the, um, decision
variables?
OK, so let's have a look at the.
And Python code.
OK, so this example.
OK, so, uh, first of all, I import all the required packages.
This is an abstract model, so and, uh, can be a number of, um, solutions.
That's, um, the number of, uh, points that I want to draw a line between them.
I is the sets that represent each node and also, um, A, B, C are the variables.
And we have a model and that or F, which is going to be representing the objective function, which
is the error of estimation.
OK, so first of all, I, um, create some random points on the plane and then, uh, write down the
objective function, which is model A, uh, multiplied by X, location A squared plus.
Um, B dot model X location plus, C minus Y location.
OK, a. it means that I'm trying to find A, B, C in a way that the difference between the line and
those points are minimal.
They square of that is minimal, and since it's a linear programming, I have to use IP iPod and then,
um, I'm using the.
Model that.
Yeah.
For this purpose and run it.
OK, and the points are here and the line is, uh, true, all of them.
OK.
And that's it.
Thank you.