Regression in Machine Learning explained with examples | The Odyssey Online
Start writing a post
Lifestyle

Regression in Machine Learning explained with examples

Introduction

24
Regression in Machine

In This Article:

Today, IEEE Spectrum reported how AI would soon make coding unnecessary for young software professionals. On the same day, there was another report that the Indian AI & ML researchers in IIT-Delhi have developed an AI-based technology to detect the presence of cancer-causing carcinogens in chemical structures.

Reading these two news items on the same day made me wonder how widespread the use of Artificial Intelligence is and how rapidly it is progressing in all sectors. Machine Learning - a subset of AI - is also generally coupled with AI.

The rise in popularity of machine learning and artificial intelligence is marked by the steep rise in demand for ML & AI MS Degrees as well as AI ML Certification courses around the world. A professional who is pursuing an AI ML Course would have come across the word ‘Regression’ quite often. So, let us take a look at this topic in detail and try to answer questions such as what is artificial intelligence, what is Regression in Machine learning, what are the different types of Regression in machine learning, and what are some of the reliable AI ML courses to propel your career in the Indian AI domain.

What is Regression in Machine Learning

Regression is a supervised learning method used for predictive modelling by Machine learning algorithms to predict continuous outcomes by investigating the relationship between independent variables - called features or predictors - and a dependent variable - called outcome or target. It is primarily used for predicting, forecasting, time series modeling, and determining the intervariable causal-effect relationship. Machine Learning models need accurate data (training data) so that the ML models are able to make accurate predictions.

Regression involves plotting a graph between the variables so that they best fit the given datapoints. Using this plotted graph, the machine learning model makes predictions about the data. So, Regression shows a line or curve that intersects all the datapoints on the target-predictor graph in such a manner that there is the least minimum vertical distance between the datapoints and the regression line. This distance between the datapoints and line is a marker of whether or not a model has captured a strong relationship between the predictors and the target.

A few examples of Regression include:

  • Predicting rain using temperature and other factors
  • Predicting road accidents due to rash driving
  • Determining Market trends.

<iframe width="560" height="315" src="https://www.youtube.com/embed/NUXdtN1W1FE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Different types of Regression in Machine Learning

There are several types of Regression techniques used in the AI ML sector. The most commonly used Regression techniques are

  • Logistic Regression
  • Linear Regression
  • Polynomial Regression

Let’s look at them in detail.

Logistic Regression in Machine Learning

Logistic Regression is a supervised learning algorithm capable of solving a particular type of problem called classification problems. Classification problems constitute dependent variables in a binary or discrete format, like in the form of 0s or 1s, True or False, Spam or not spam, Yes or No, etc. This predictive analysis algorithm works on the concept of probability, using the sigmoid function or logistic function - a complex cost function. These sigmoid function models the data in logistic Regression. The function can be represented as:

f(X) = 1 / (1+e-x)

where,

  • f(x) is the output between the 0 and 1 values,
  • X is the input value to the function, and
  • E is the base of the natural logarithm.

When we input values (data) into the function, it gives an S-curve as follows:

Logistic Regression uses the threshold levels concept, where values more than the threshold level are rounded up to 1, and values less than the threshold level are rounded up to 0.

Logistic Regression can further be classified into 3 types:

  • Binary(0/1, pass/fail)
  • Multi(cats, dogs, lions)
  • Ordinal(low, medium, high)

Linear Regression in Machine Learning

Linear Regression is another statistical regression method used for predictive analysis. This simple and easy algorithm works on Regression by showing the relationship between the independent variable on the X-axis and the dependent variable on the Y-axis. So, it is called linear Regression. Linear Regression with only one input variable (x) is called simple linear Regression, and the ones with more than one input variable are called multiple linear Regression.

In the below example, we are predicting the salary of an employee based on the number of years of experience.

The mathematical equation for this Linear Regression is

Y= aX+b

where Y represents the dependent or target variables,

X represents the independent or predictor variables, and

a and b are the linear coefficients

The popular applications of linear Regression include

  • Analyzing trends and sales estimates
  • Real estate prediction
  • Salary forecasting
  • Arriving at ETAs in traffic.

Polynomial Regression in Machine Learning

Polynomial Regression models the non-linear dataset using a linear model. In some ways, it resembles multiple linear Regression. But it juxtaposes a non-linear curve between the x-value and the corresponding conditional y-values. For instance, imagine a dataset that consists of data points present in a non-linear fashion. In this case, linear Regression is not the best fit for those data points. Hence, to cover such data points, we must use Polynomial regression.

Polynomial Regression transfers the original features into polynomial features of a given degree and then models them using a linear model. This makes the data points best suitable to a polynomial line.

In Polynomial Regression, the Linear regression equation Y= b0+ b1x, is converted into the Polynomial regression equation Y= b0+b1x+ b2x2+ b3x3+.....+ bnxn.

So, n Polynomial regression, a single element has different degrees instead of multiple variables with the same degree.

Here,

  • X is our independent/input variable,
  • Y is the predicted/target output, and
  • b0, b1,... bn are the regression coefficients.

This model is again linear because the coefficients are still linear with quadratic coefficients.

Conclusion

Now that we have explained What is Regression in machine learning with examples, you must be in a better position to decide whether Artificial Intelligence & Machine Learning is the most suitable career choice for you. If you are interested in an Indian AI ML course, check out the Professional Certificate Program In AI And Machine Learning linked at the top of this article. We hope you the best of luck in your AI & ML journey!

Report this Content
This article has not been reviewed by Odyssey HQ and solely reflects the ideas and opinions of the creator.
campus
CampusExplorer

New year, new semester, not the same old thing. This semester will be a semester to redeem all the mistakes made in the previous five months.

1. I will wake up (sorta) on time for class.

Let's face it, last semester you woke up with enough time to brush your teeth and get to class and even then you were about 10 minutes late and rollin' in with some pretty unfortunate bed head. This semester we will set our alarms, wake up with time to get ready, and get to class on time!

Keep Reading...Show less
Student Life

The 5 Painfully True Stages Of Camping Out At The Library

For those long nights that turn into mornings when the struggle is real.

1894
woman reading a book while sitting on black leather 3-seat couch
Photo by Seven Shooter on Unsplash

And so it begins.

1. Walk in motivated and ready to rock

Camping out at the library is not for the faint of heart. You need to go in as a warrior. You usually have brought supplies (laptop, chargers, and textbooks) and sustenance (water, snacks, and blanket/sweatpants) since the battle will be for an undetermined length of time. Perhaps it is one assignment or perhaps it's four. You are motivated and prepared; you don’t doubt the assignment(s) will take time, but you know it couldn’t be that long.

Keep Reading...Show less
Student Life

The 14 Stages Of The Last Week Of Class

You need sleep, but also have 13 things due in the span of 4 days.

1200
black marker on notebook

December... it's full of finals, due dates, Mariah Carey, and the holidays. It's the worst time of the year, but the best because after finals, you get to not think about classes for a month and catch up on all the sleep you lost throughout the semester. But what's worse than finals week is the last week of classes, when all the due dates you've put off can no longer be put off anymore.

Keep Reading...Show less
Student Life

Top 20 Thoughts College Students Have During Finals

The ultimate list and gif guide to a college student's brain during finals.

356
winter

Thanksgiving break is over and Christmas is just around the corner and that means, for most college students, one hellish thing — finals week. It's the one time of year in which the library becomes over populated and mental breakdowns are most frequent. There is no way to avoid it or a cure for the pain that it brings. All we can do is hunker down with our books, order some Dominos, and pray that it will all be over soon. Luckily, we are not alone in this suffering. To prove it, here are just a few of the many deranged thoughts that go through a college student's mind during finals week.

Keep Reading...Show less
Student Life

28 Daily Thoughts of College Students

"I want to thank Google, Wikipedia, and whoever else invented copy and paste. Thank you."

1776
group of people sitting on bench near trees duting daytime

I know every college student has daily thoughts throughout their day. Whether you're walking on campus or attending class, we always have thoughts running a mile a minute through our heads. We may be wondering why we even showed up to class because we'd rather be sleeping, or when the professor announces that we have a test and you have an immediate panic attack.

Keep Reading...Show less

Subscribe to Our Newsletter

Facebook Comments