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 on:

Share Your Insights

More from EnjoyAlgorithms

Employee Attrition Prediction using ML

In this blog, we have demonstrated data analysis of the company's attrition rate and built a machine learning model (logistic regression model) to predict it. We have explored some exciting patterns that lead to employee attrition. We will be using Kaggle's IBM HR analytics Employee Attrition and Performance dataset for this analysis.

Introduction to Jupyter Notebook

Jupyter Notebook is a popular open-source IDE for data science and machine learning practitioners. It supports three programming languages: Julia, Python, and R. In this guide, we cover the installation process for Jupyter Notebook, as well as provide an overview of the basic steps for starting the server, creating notebooks, executing cells, and working with kernels.

Applications of Regex in Data Science

In this blog, we will focus on applications of regex by implementing it to some tedious tasks that wouldnโ€™t be possible without regular expressions. Some standard applications of regular expressions in data science: 1) Web scraping and data collection 2) Text preprocessing (NLP) 3) Pattern detection for IDs, e-mails, names 4) Date-time manipulations

Introduction to Databases for Data Science

In data science, databases play a crucial role in storing, managing, and scaling large amounts of data. This data is then analyzed to gain meaningful insights. In this blog, we will delve into the concept of databases and understand how data science relies on them, as well as their advantages.

Pre-processing Time Series Data in Machine Learning

Time Series Preprocessing techniques have a significant influence on data modeling accuracy. In this blog, we have discussed: 1) Definition of time-series data and its importance. 2) Preprocessing steps for time series data 3) Structuring time-series data, finding the missing values, denoising the features, and finding the outliers present in the dataset.

Detection of Music Instrument using Neural Networks

In this blog, we have built a neural network model to predict the musical instrument by listening to music from it. We have solved the same problem using two methods with more than 99% of accuracy: 1) Converting audio signals into spectrogram images and then performing prediction, 2) Calculating the MFCC score for audio signals and using it for model building.

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.