I am Rahul from LearnVern,( 6 seconds pause ; music )
In our previous tutorial of Machine Learning, we studied Classifications.
Here, we understood that suppose I have a blue and red ball, and I got a new ball, and i want to classify the color of the ball, is it blue or red ? So by looking at its color, supposingly it belongs to blue color so I can easily classify that ball as to the class which it will belong to.
So,today we are going to learn about its algorithm known as logistic regression.
It is called regression, meaning we get continuous values in its output.
For instance, what is the price of this house, this is priced at 79.5 lakhs, and, what is the price of this house?
This is priced at 65.2 lakhs.
So, these are continuous values 40 lakhs, 41.2 lakhs, 50 lakhs, having a continuous numerical value.
logistic regression gives us the final output categorically, based on our classification.
Let’s understand what logical regression is !
Logistic regression works on probability.
For instance, pass or fail , so how much is the probability that he will pass.
If the probability is high, he will pass and if it is low, he will fail.
over here, we are using a threshold that if it comes above 50 then, he will pass and if it comes below that he will fail.
Here you should observe that the logistic regression is giving us continuous values in its output but the final output is based upon threshold so it is giving Categorical output.
Here, there are some examples that is given win or lose, alive or dead, healthy or sick
So, logistic regression solves the problem in classification. Logical regression solves this.
Even if we have a multi-class classification, logistic regression has the capability to solve them also..
So, now let's see on the basis of which formula does it work.
This works on the basis of Sigmoid function.
You can see the function on the screen,
The Sigmoid function is 1 divided by 1 plus exponential , e raise to exponential, minus x, so e raise to minus x, it works on this.
So, this entire value forms a S shaped curve, and it gives value within a certain limit and here we also set a threshold, so the upper one belongs to one class and the lower to the other class.
You can see that this is going till 1st and this is going till zero.
whatever values we get such as zero, 0.1,0.2, uptil 0.8, 0.9 then 1.
The formation of values is continuous.
But we have set a threshold value at point 5 above that is 1 and below that is zero, this way one is a class and zero is the other class, one is a win class and zero is a loose class.
So, this is the way regression gives an output but the final output is of classification.
Clear guys !
So, in this also we have different types. Among them is binomial, bi meaning two such as 0,1 and pass and fail, right or wrong.
So, if you have to do just two types of classification then, you can use binomial logistic regression.
Next, is multinomial, here if you have a cat, dog, sheep or even more animals than this, and you have to classify it, then you have to use a multinomial type of regression.
Here in the example of cat, dog and sheep there is no order in it, like 1st, 2nd and third ranking, so this is a multinomial type of logistic regression.
After that one more, in that we need to maintain order. We call them ordinal,
Next, regression is ordinal logistics regression.
As you can see here, low meaning less, medium meaning little bigger than the previous one and third is high meaning even bigger than the rest.
So, here we are maintaining an order, so the logistic regression that is used here is known as Ordinal logistics regression.
So, we saw different types of logistic regression.
So we will stop here for today's session, and we will continue in the next session.
If you have any queries or comments, click the discussion button below the video and post there. This way, you will be able to connect to fellow learners and discuss the course. Also, Our Team will try to solve your query.
Share a personalized message with your friends.