# Share My CreationPlaying with linear regression

#### Erel

Staff member

Project is attached.

#### Attachments

• 5.1 KB Views: 78

#### emexes

##### Well-Known Member
I like that it goes to higher orders of polynomials than just a plain old boring straight line

One method of measuring internal losses of a rotating system is to spin it up, measure how the rate at which it slows down, multiply by the rotating inertia, and fit to a quadratic (because friction/resistance is usually proportional to the square of the speed).

#### Erel

Staff member
I like that it goes to higher orders of polynomials than just a plain old boring straight line
It can actually match almost any function you like.
The brown plot is A * x + B * Sin(X)

#### Jeffrey Cameron

##### Well-Known Member
That looks cool, but for those of us dinosaurs that grew up with COBOL and monochrome CRT displays, what does this demonstrate? Or, more accurately, how can this be applied to apps?

#### Erel

Staff member
That looks cool, but for those of us dinosaurs that grew up with COBOL and monochrome CRT displays, what does this demonstrate?
This is a primitive example of machine learning.
The input is made of the X values and the desired output is the Y values.
We have some known samples: the mapping between the X coordinates and the Y coordinates of the clicked points.

We want to find a formula that will allow us to find the Y values based on other X values.

If you have two points and you know that there is a linear relation between X and Y then it is trivial to find such formula. This example uses a more sophisticated algorithm to try to match more complex relations.

Or, more accurately, how can this be applied to apps?
It is probably a bit too primitive and simplistic to actually be used for something real, however inspiration is also important...