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

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.
Relationships

10 Facts All People In A Large Family Can Confirm During The Holiday Season

The holiday season can be the best and most stressful time of the year, especially when more people are involved.

169
kids jumping

The holidays are full of lights, sweets, sweaters, and your favorite movies. There's nothing quite like this period from the beginning of December through January. Christmas, Hanukkah, and New Years. The fun of it all.

I don't know about you but with my large Italian family something is always going on during this season. It can be the most wonderful time of the year while also being the most hectic. These are a few things you know if your family is anything like mine during this time.

Keep Reading...Show less
10 things that happen the second Thanksgiving is over
reference.com

To those who celebrate, you just spent an entire day cooking an elaborate meal with all of your favorite foods. You probably ate your body weight in pumpkin pie and mashed potatoes. What happens now? Oh yea, Christmas. It’s time to take out all of the decorations and Christmas themed things that have been sitting in the attic since last year; it’s time to make a reappearance. So, here are 10 things that happen the second Thanksgiving is over.

Keep Reading...Show less
Adulting

18 Things I Want To Do Now That I'm 18

I'm technically an adult, so I'm legally required to live a little, right?

3695
Happy Birthday Cake

For the entirety of my high school career, I was always seen as the goody-two-shoes. I never got in trouble with a teacher, I kept stellar grades, and when I wasn't doing extracurricular activities, I was at home studying. Even when I did go out, it was usually with a bunch of fellow band geeks. The night would end before 11:00 PM and the only controversial activity would be a fight based on who unfairly won a round of Apples-to-Apples when someone else clearly had a better card (I promise I'm not still holding a grudge).

Now that I'm officially an adult, I want to pursue some new things. I want to experience life in a way that I never allowed myself to do prior to entering college. These are the years that I'm supposed to embark on a journey of self-discovery, so what better way to do that than to create a bucket list?

Keep Reading...Show less
Featured

10 Life Lessons from Christmas Classics

The holiday classics that shaped my life

2257
10 Life Lessons from Christmas Classics
Flickr

The holiday season is full of stress, debt, and forced conversation. While we rush through the month of December, it's important to take a step back and enjoy the moments before they're gone. Most families love to watch Christmas movies, but these beloved films provide more than entertainment. Here are 10 life lessons that I've learned from the holiday classics we watch every year.

Keep Reading...Show less
Featured

15 Mind-Bending Riddles

Hopefully they will make you laugh.

201593
 Ilistrated image of the planet and images of questions
StableDiffusion

I've been super busy lately with school work, studying, etc. Besides the fact that I do nothing but AP chemistry and AP economics, I constantly think of stupid questions that are almost impossible to answer. So, maybe you could answer them for me, and if not then we can both wonder what the answers to these 15 questions could be.

Keep Reading...Show less

Subscribe to Our Newsletter

Facebook Comments