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

Design Perceptron to Learn AND, OR and XOR Logic Gates

Perceptron is the most fundamental unit of Neural Network architecture in Machine Learning. In this article, we will learn to design a perceptron from scratch in Python to make it learn the properties of AND, OR and XOR logic gates. We will observe the need for multiple layer perceptron (MLP) over single layer perceptron.

How Machine Learns in Machine Learning?

In Machine Learning, a machine learns by using algorithms and statistical models to identify patterns in data. Here the process of learning begins with feeding a large amount of training data to the algorithm. The algorithm then uses this data to make predictions or take actions based on the patterns it has identified. In other words, the algorithm constantly adjusts its parameters to minimize the difference between its predictions and actual outcomes.

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.

Customer Churn Prediction using Machine Learning

Customer churn is the term used to describe customers who might stop using the company's products or services. Netflix, telecom, or other subscription-based companies use machine learning algorithms to predict the customer churn rate. In this article, we have used a decision tree to build a machine learning model to predict customer churn rate and achieved an accuracy of 83%.

Crop Yield Prediction Using Machine Learning (ANN)

Artificial Neural Networks (ANNs) have the potential to benefit agriculture by providing accurate predictions of crop yield. Such predictions can be helpful for farmers, allowing them to estimate their profits more precisely. In this blog, we will build an ANN model for crop yield prediction and analyze the impact of rainfall, temperature, and pesticide usage on crop production.

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.

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.