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:

More from EnjoyAlgorithms

Introduction to APIs for Data Science and Machine Learning

In machine learning and data science, API (Application Programming Interface) is a powerful tool that enables seamless communication and data sharing between applications and servers. APIs are mainly used for data gathering and model deployment In data science and ML. This blog provides a step-by-step explanation of how APIs work.

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.

What is Data Science? Introduction and Importance

These days, companies are collecting huge amounts of data, but the question is: what is the purpose of this data? This is where data science comes into play. Data science is a field that extracts, processes, analyzes, and interprets data to derive various insights from it. In this blog, we will discuss the importance of data science and various key concepts.

Drug Discovery using Machine Learning

Machine Learning and Data Science have become vital in developing life-saving applications, such as drug discovery. Using these ML technologies, researchers can reduce the time needed to create new medicines for known and unknown diseases. In this blog post, we provide a step-by-step guide to building an application that addresses the drug discovery problem using Machine Learning in Python. To solve this regression problem, we utilized the XGBoost regressor model, which is a popular CART algorithm in the ML community.

Stock Market Price Prediction Using Machine Learning

Artificial Neural Networks (ANNs) are used to forecast the stock market price. Based on that, Traders take a decision on whether to buy or sell any stock. In this blog, we will be building a forecasting technique for Amazon stock prices using 1 and 2 hidden-layer neural networks. We will evaluate and compare the performance of ANN with the traditional SVM model.

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