← TuringMD

Regression

Remember high school maths?

At some point, you probably learned about functions.

Functions are rules that match inputs to outputs. They’re the real-world versions of theoretical algorithms.

Why does this matter?

Because with the right function, we can teach a computer to “think” for itself.

Consider this made-up graph of, say, smoking vs cancer risk:

Now, let’s draw a line that fits these points as closely as possible:

We can then find the function represented by this blue line (call it Function A).

Now, any time we have one of these two variables (i.e. a peron's smoking or cancer risk), we can plug it into Function A to find the other:

Any time we (or computers) use a function like this to make predictions, it’s called regression.

When we use a straight line, it's called linear regression, but we can use curves as well.

At this point, you might be wondering: how did we know where to draw the blue line on the graph above?

Isn’t it a bit imprecise to just roughly trace the points?

This leads us to parameters.