#linear regression

18 messages · Page 1 of 1 (latest)

scarlet tiger
#

When we say "we keep moving this line through the data points," we mean that we are trying to find the line that best represents the relationship between the variables by adjusting the slope and intercept of the line. We do this by measuring the square distance between the data points and the regression line, and trying to minimize this distance.

crystal wadi
#

You try to minimise the sum of the squared distances

#

Idk how good you are at maths, but mathematically (for one independent variable x) you want to find

fading fernBOT
candid ermineBOT
crystal wadi
#

That's what you're trying to solve for a linear regression (with one independent variable)

#

In simple terms, you want to find the slope and bias of the regression line that minimises the sum of the squared residuals

#

Where the sum of squared residuals is the sum of the distances of each data point to the regression line squared

#

Same concept

candid ermineBOT
crystal wadi
#

The right hand side the mx_i+c is the regression line you try

#

And to mae predictions using your regression line, you plug in each data point into the equation

#

Then you find the squared residuals like that

#

c is not the coefficient of y but the y-intercept

#

or the bias

#

but yeah, conceptually that's correct

crystal wadi
#

I feel like you don't quite understand the concept behind linear regression

#

Fitting a line to data is actually pretty straightforward.

For a complete index of all the StatQuest videos, check out:
https://statquest.org/video-index/

If you'd like to support StatQuest, please consider...

Buying The StatQuest Illustrated Guide to Machine Learning!!!
PDF - https://statquest.gumroad.com/l/wvtmc
Paperback - https://www.amaz...

▶ Play video