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

Car Resale Value Prediction Using Machine Learning

Machine Learning has become a tool used in almost every task that requires estimation. Companies like Cars24 and Cardekho.com uses Regression analysis to estimate the used car prices. So we need to build a model to estimate the price of used cars. The model should take car-related parameters and output a selling price.

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.

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.

Linear Regression in Machine Learning

Linear Regression is a supervised machine learning algorithm used to solve regression problems. In this blog, we have discussed: 1) What is linear regression? 2) Various types 3) The loss function for linear regression 4) Ordinary Least Squares (OLS) method 5) Polynomial regression 6) Python implementation of linear regression.

Time Series Forecasting Using Machine Learning

Time series forecasting uses statistical models to predict future values using previously recorded observations. It is classified into two parts: 1) Univariate time series forecasting (Involves a single variable) 2) Multivariate time series forecasting (Involves multiple variables). Note: Time Series is a set of observations taken at a specific periodic time.

Components of an Artificial Neural Network

To fully grasp the concept of a Neural Network, we need to understand the various components that make up a Neural Network. In this blog, we delve into the key components of a Neural Network, including Neurons, Input Layers, Output Layers, Hidden Layers, Connections, Parameters, Activation Functions, Optimization Algorithms, and Cost Functions. These components work together to solve both classification and regression problems in Machine Learning.

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.