WEBVTT

00:01.380 --> 00:09.270
I don't know if we have discussed about the supervised learning models, we have discussed about the

00:09.270 --> 00:18.630
linear regression and they have understood why aggression is used, meaning aggression is used for finding

00:18.630 --> 00:20.190
out continuous values.

00:20.820 --> 00:28.440
Now I want to find out something like height, weight or Cecile's price.

00:28.650 --> 00:32.340
In those situations, I can easily use linear regression.

00:33.210 --> 00:41.250
But now we have another type of problem, which is logistic problem, which is a problem where we want

00:41.250 --> 00:43.770
to find both different classes.

00:44.460 --> 00:49.890
We want to find out if a particular value is yes or no.

00:50.110 --> 00:53.250
We want to find out answer to a problem.

00:53.490 --> 01:02.190
That is, if someone will buy my product or not, whether someone should default on a loan or not.

01:02.550 --> 01:09.260
So these are different type of problems which we will be solving on in case of logistic regression.

01:09.900 --> 01:14.250
But why is it called regression when we are not really doing regression?

01:14.820 --> 01:15.290
Right.

01:15.530 --> 01:22.140
Regression means that we want to predict continuous values, but in logistic regression we are doing

01:22.140 --> 01:23.070
classification.

01:23.070 --> 01:28.170
That is, we are trying to find out the answer to a class that is a categorical variable.

01:28.440 --> 01:35.700
That is, we want to find out if someone is a particular animal, it is a cat or not, or if someone

01:35.700 --> 01:44.280
will default on a loan or not, if someone will buy my product or not solve some problem which has us

01:44.580 --> 01:46.630
a high class problem.

01:47.490 --> 01:53.610
So these type of problems should not be considered like a regression problem.

01:53.610 --> 01:54.000
Right.

01:54.180 --> 01:56.890
But still, we are calling it a regression problem.

01:57.090 --> 02:01.980
Now, this is because not because it is a regression algorithm.

02:01.980 --> 02:04.800
It is classification algorithm only.

02:04.980 --> 02:14.310
But the problem is that the logistic regression is using regression in donelli in the calculations,

02:15.090 --> 02:18.660
and only it is performing some kind of regression.

02:18.960 --> 02:23.500
That is the reason why we are calling it logistic regression back.

02:23.700 --> 02:32.100
Logistic regression is used for classification problems while for continuous value problems for regression

02:32.100 --> 02:32.730
problems.

02:32.970 --> 02:35.170
We use linear regression.

02:36.000 --> 02:39.960
So this is something which you need to keep in mind always.

02:41.570 --> 02:47.860
Now, you have seen how the model continues, medic responds with limited aggression technique, but

02:47.870 --> 02:54.860
in many business scenarios, our target is binary in nature by any means, something which has the answer,

02:54.870 --> 02:56.000
zero or one.

02:56.600 --> 03:02.760
So, for example, whether someone will buy my product, whether someone will default on a loan or not.

03:03.050 --> 03:09.380
So answer to all of these question and many other such questions is yes or no.

03:10.130 --> 03:18.290
We can convert that to zero and one and then try to model them with linear regression technique, but

03:18.290 --> 03:20.790
that does not give good result.

03:21.680 --> 03:23.000
So let's have a look.

03:25.130 --> 03:33.320
So let us have a look at this particular image here now in this particular image, we have the data

03:33.320 --> 03:34.400
point like this.

03:34.640 --> 03:37.730
That is one of the barometer.

03:37.730 --> 03:43.010
One of the target value is zettl and another target value is one.

03:43.760 --> 03:51.620
Now, in this case, if I will apply a linear regression and I will try to put a line here, then the

03:51.620 --> 04:00.410
line will not be able to satisfy the problem because it is going diagonally from the data on my glasses

04:00.410 --> 04:01.370
on like this.

04:01.550 --> 04:05.540
So how will I make my decisions with such kind of a line?

04:07.070 --> 04:14.690
So you can see how far badly this will feel, and that is why we really need something like this, so

04:15.380 --> 04:23.390
what we need is we will create something like this, the image which is present Velu.

04:25.230 --> 04:31.980
Now, to actually reach to this point, to actually reach to this kind of construct, which will give

04:31.980 --> 04:40.470
us this kind of line, this kind of goal, which will be able to map to this data, which is in a class

04:40.470 --> 04:45.090
form, we will have to develop certain kind of understanding.

04:46.010 --> 04:53.640
So then now we have seen that regression approach will feel at different levels.

04:53.840 --> 04:58.670
So we will have to look at these kind of problems from a different perspective.

04:59.060 --> 05:06.110
So let us consider the particular data where we have different values for yes, no, yes, no.

05:06.230 --> 05:07.910
And different age values.

05:10.710 --> 05:19.500
So in this condition for this particular type of data, here we were we ask the children of various

05:19.500 --> 05:23.400
ages whether they are afraid of ghost or not.

05:24.150 --> 05:27.570
Now, here we have different answers from these children.

05:27.780 --> 05:34.210
So the children of age four, there are four children who say yes, one child who says no.

05:34.530 --> 05:39.270
There are three children of age five who say yes to say no.

05:39.510 --> 05:45.000
Six of three to children of age six who say yes and so on.

05:45.510 --> 05:47.250
So now what we will do.

05:48.320 --> 05:56.060
Now, if someone will ask a question that what might be the response for a child who's ages seven,

05:56.210 --> 06:04.010
then you can see that the response will be no, because here the majority of the children of age seven

06:04.190 --> 06:07.400
have responded with no right.

06:07.640 --> 06:11.150
So what did you do there to find out?

06:11.400 --> 06:13.910
You found out the probability of it.

06:14.780 --> 06:21.860
You would just simply check and the probability of the response being low when the age is seven and

06:21.860 --> 06:25.310
you naturally guessed that the answer will be no.

06:25.880 --> 06:33.380
So in this case, we did not model why we did not find out the value.

06:33.380 --> 06:36.800
We simply create a model for the probability.

06:37.670 --> 06:44.360
So in this case, what we will be doing is we will simply create the model with probability of Vike

06:44.360 --> 06:44.720
will do.

06:44.720 --> 06:45.140
Yes.

06:45.320 --> 06:48.800
Or probability of equal to no.

06:50.700 --> 06:59.370
So for this, we will be leaders of the north, this entire thing, by being the probability so we can

06:59.370 --> 07:06.650
see visible to be done on, plus be the one with the X one, plus BWB likes to be WB Deakes.

07:07.050 --> 07:10.680
So these are the equation which we used to have for integration.

07:10.980 --> 07:13.940
But now we are not finding out the Nenad equation.

07:13.950 --> 07:19.440
We are not actually finding out the continuous value, but we are finding out the probability.

07:19.450 --> 07:24.270
So we will say that this should be the probability of this equation, this probability.

07:24.270 --> 07:26.880
We will assign it as the probability.

07:28.650 --> 07:35.610
Now, this will be a little problematic because the probability value has to range from zero to one,

07:35.910 --> 07:42.120
while the regression value of this particular equation value will range from minus infinity to plus

07:42.120 --> 07:42.720
infinity.

07:42.990 --> 07:49.110
Now, for this, we will have to transform this particular equation that must be done on.

07:49.130 --> 07:56.100
Plus, with our next month, as we do X plus, we get to expand so on into a particular range where

07:56.100 --> 08:03.030
this will range from zero to one, then we can use this equation to find out the probability.

08:04.970 --> 08:06.440
Now, let us go back.

08:11.180 --> 08:14.220
Now, let us see what are we trying to predict here?

08:15.050 --> 08:18.260
Now the classes which are being predicted.

08:18.290 --> 08:23.640
So here we are trying to predict different classes and we are not predicting continuous numbers.

08:23.640 --> 08:25.010
So that does not target.

08:25.070 --> 08:28.180
We are not solving the problem.

08:28.430 --> 08:36.710
The name only has logistic regression, but the main purpose here is to solve a classification problem.

08:36.980 --> 08:43.100
So what are different types of classes, which would be the different type of classes for the dog or

08:43.100 --> 08:45.270
dog bus or field?

08:45.530 --> 08:48.600
Yes or no approval or rejection.

08:48.710 --> 08:53.780
So these are these two types of values which could be placed in the logistic regression problem.

08:55.030 --> 09:04.480
Now, these two classes should be of a type which are more possible together, like someone cannot force

09:04.480 --> 09:06.630
and feel the exam the same thing.

09:06.880 --> 09:09.960
So we cannot have something which can occur together.

09:10.260 --> 09:14.460
An animal cannot be OK and go vote together.

09:14.470 --> 09:15.310
I'm the same thing.

09:15.350 --> 09:21.720
It has to be either a gag order, but a person has to either pass the exam or fail exam.

09:22.000 --> 09:22.320
Right.

09:22.600 --> 09:31.180
So now the probability of the outcome being in favor of one class as finding out just how class may

09:31.180 --> 09:34.190
not be enough to clarify the understanding.

09:34.360 --> 09:36.160
So let's see if I.

09:37.340 --> 09:48.200
Simply find out the hard place that is something is a gap or something is a dog that can be a feasible

09:48.200 --> 09:52.370
solution because I want to know more about.

09:54.130 --> 10:02.200
Simply knowing that a person let us see, we have an example here that we are trying to predict whether

10:02.200 --> 10:07.830
a particular person might have a heart disease or not for their particular ages.

10:08.260 --> 10:18.340
Now, if they say yes for both age 45 and 85, that is not informative enough because a person was ages

10:18.400 --> 10:25.870
45 will have less probability of having a heart disease in comparison to person whose age is eighty

10:25.870 --> 10:32.110
five, the person whose ages 85 is obviously more at risk of having a heart disease.

10:33.390 --> 10:40.530
So for solving such problems, we actually need to know the probability of something happening if we

10:40.530 --> 10:47.070
have a patient, a cancer patient, a person who is destined for cancer, and I simply say that you

10:47.070 --> 10:47.860
have cancer.

10:47.880 --> 10:50.590
Yes or no, that is not informative enough.

10:50.880 --> 10:54.650
I want to know, what are the chances of someone's death?

10:54.660 --> 10:56.310
Would it be considered normal?

10:56.640 --> 11:04.140
So I need to know if there is a 90 percent chance of someone having cancer or there is a 10 percent

11:04.140 --> 11:05.860
chance of someone having cancer.

11:06.090 --> 11:10.090
And based on that, I can actually prescribe the next step.

11:10.370 --> 11:16.030
That is what kind of test that person should have or what kind of medicines that person should have.

11:16.260 --> 11:20.870
So those things will be dependent on the probability, which I will be getting Golia.

11:22.160 --> 11:22.460
Right.

11:22.850 --> 11:33.230
So this implies that we want to find out the probability of the value being one given access to that

11:33.230 --> 11:41.990
is we want to find out probability of an animal being gagged, given that it has certain characteristics.

11:42.540 --> 11:49.280
For example, the characteristics would be the animal, says M. or the animal has whiskers on the face.

11:49.310 --> 11:52.670
So these are different kind of characteristics which we have.

11:54.130 --> 12:03.940
So we want to find out we want to predict the probability of vibin one given X, so what are the difference

12:03.940 --> 12:06.860
between linear regression and logistic regression?

12:07.120 --> 12:13.540
The difference is that of the target value for one that is in linear regression.

12:13.550 --> 12:19.810
We want to find out the continuous dependent variable, the value which we are trying to predict is

12:19.810 --> 12:21.820
a continuous dependent variable.

12:23.030 --> 12:32.810
In case of logistic regression, we want to find out about certain classes that is either a value zero

12:32.810 --> 12:38.000
or one based on the probability value, which will be ranging from zero to one.

12:38.210 --> 12:45.050
All that is we are trying to find out a value which is between range zero and one, while in case of

12:45.050 --> 12:51.020
linear regression, we want to find out the value, which is ranging from minus infinity to plus infinity,

12:51.020 --> 12:57.110
because cantinas value will be ranging from minus infinity to plus infinity, while the probabilities,

12:57.440 --> 13:01.160
the probability ranges from zero to one.

13:02.710 --> 13:08.230
Now, what are different, but we will see just for linear regression, the attributes are independent

13:08.230 --> 13:08.880
variables.

13:08.890 --> 13:11.730
These can be continuous or discrete in nature.

13:12.130 --> 13:19.060
And in case of logistic regression, the again, the variables can be continuous or discrete.

13:19.090 --> 13:22.090
So there is a similar kind of you just can be present in both.

13:23.200 --> 13:28.510
Now, what is the equation that we are forming in case of media regression, the equation which is formed

13:28.510 --> 13:37.720
in case of regression, is in the form visible to be done, or plus B, the one in two X one plus some

13:37.720 --> 13:46.630
particular added value by in case of logistic regression, the equation is probability is equal to one

13:46.630 --> 13:53.950
upon one plus E to the power minus the same equation for linear equation be done or plus B that takes

13:53.950 --> 13:56.070
one plus B that we do and so on.

13:56.620 --> 14:02.070
So how we form this equation is what we will learn in this particular session.

14:02.410 --> 14:06.880
But for now, you can just know that this is the equation for logistic regression.

14:08.150 --> 14:13.810
Now, what are the different type of problems which we solve in case of linear regression, these are

14:14.020 --> 14:16.010
temperature marks of student.

14:16.310 --> 14:17.980
What are the future scenes?

14:18.170 --> 14:20.720
What are the prices of commodities?

14:21.260 --> 14:26.960
These are different things which we're finding out in case of linear regression, in case of logistic

14:26.960 --> 14:33.230
regression, what we're finding out in days of logistic regression, we are finding of the binary classes.

14:33.440 --> 14:36.860
That is if if an animal is cat or dog.

14:37.870 --> 14:43.940
If someone passes or fails the examination, if the loan would be approved or rejected.

14:44.140 --> 14:49.450
So these are different kind of things which we predict in case of logistic regression.

14:49.990 --> 14:51.190
Now, let's go for the.

14:52.410 --> 14:55.950
Now, what is the definition of logistic regression?

14:57.580 --> 15:06.250
The logistic regression technique is used for finding out results which can be presented in the binary

15:06.250 --> 15:16.150
zero or one or two or four or more yes or no values means that the outcome could only be in either one

15:16.150 --> 15:18.010
form or of the two.

15:18.820 --> 15:26.960
For example, it can be utilized when we need to find the probability of success or failure of an event.

15:28.480 --> 15:35.800
So here we are finding out if a particular animal is a gag order dog, and here we are finding out the

15:35.800 --> 15:41.200
values from either buy is equal to zero or V. is equal to one.

15:43.280 --> 15:51.500
This we have already seen that this is the linear equation, which gives us the continuous values which

15:51.500 --> 15:58.400
would which would not be of much use if we want to classify Target into two different classes because

15:58.400 --> 16:01.220
the Nenad equation will not be able to map these values.

16:01.820 --> 16:08.660
So to map linear regression equation such that we could get above as shown in figure to.

16:10.230 --> 16:12.630
Which could give us values.

16:13.680 --> 16:17.250
Close to zero and one for a given attribute.

16:17.560 --> 16:19.610
So that is our objective here.

16:21.670 --> 16:29.770
So why is it called aggression, if it is finding out biology classes, so it is underlying Dick is

16:29.770 --> 16:32.120
quite similar to linear regression.

16:32.440 --> 16:39.160
So as we know, the equation which we will be creating would be kind of using the linear regression

16:39.160 --> 16:43.950
equation, but only the Wii will be switched with the probability value.

16:45.760 --> 16:49.870
So that logic is taken from the logic function.

16:49.900 --> 16:56.530
This is the logic function is one upon one plus E to the power minus the.

16:57.710 --> 17:06.090
So that that is used in this classification, so we will be using this logic function for this classification.

17:06.380 --> 17:07.700
We will be converting.

17:08.920 --> 17:17.530
This is equal to be not to be done or the speed of the next one plus two weeks to still be three extreme

17:18.040 --> 17:18.290
two.

17:19.490 --> 17:28.030
This kind of equation, that is the logit equation, that is one point, one plus or minus mid-north

17:28.030 --> 17:30.440
authors with our next one plus 21.

17:32.320 --> 17:39.190
So our task here is to convert this linear model into the logistic model.

17:43.820 --> 17:52.640
So there is this log function which will take care of the range mismatch issue, how this happens,

17:52.640 --> 18:00.410
we will have a look at it in the next session where we will study about the mathematics behind the logistic

18:00.410 --> 18:01.010
regression.

18:01.400 --> 18:03.490
So let's go to the next session.
