Which offset is used to fit the least square line of linear regression

This is one of the basic questions asked in the interview related to linear regression.
๐๐ž๐ซ๐ฉ๐ž๐ง๐๐ข๐œ๐ฎ๐ฅ๐š๐ซ ๐จ๐Ÿ๐Ÿ๐ฌ๐ž๐ญ: Perpendicular distance of every data sample with the predicted line is calculated, and weights get updated accordingly.
๐•๐ž๐ซ๐ญ๐ข๐œ๐š๐ฅ ๐Ž๐Ÿ๐Ÿ๐ฌ๐ž๐ญ: Direct difference of prediction and the actual values are calculated and weights get updated accordingly.
With this explanation, one can easily guess the answer, which is "Vertical Offset".

Enjoy Learning! Enjoy Thinking!

Share Your Insights

โ˜† 16-week live DSA course
โ˜† 16-week live ML course
โ˜† 10-week live DSA course

More from EnjoyAlgorithms

Self-paced Courses and Blogs

Coding Interview

Machine Learning

System Design

Our Newsletter

Subscribe to get well designed content on data structure and algorithms, machine learning, system design, object orientd programming and math.