[00:04:49] okay so good morning all good morning good morning all yes so there are less participant is there more people need to be joined so we'll just start in two minute okay after the two to three minute we'll start the session yes yes yes we'll just start in the two minute good morning yes yes i am waiting for the other members to come okay [00:06:58] we'll just wait for two to three minutes we'll start in the two minute yeah i understand okay [00:08:35] so good morning so good morning good morning so we'll start the session okay so i am sharing my [00:08:44] screen to you okay so in this particular class in this particular class we'll tell about the [00:08:53] linear regression okay so this is the very first thing or this is the very first algorithm that we [00:09:00] need to go into implement okay so before we are going to implement the first model we need to see [00:09:08] that what are the things behind that particular thing so the thing is that the linear regression [00:09:14] so before we are moving this as you are already know about the machine learning okay the machine [00:09:21] learning is there so machine learning is machine learning is having the two to three type okay [00:09:28] directly with the supervised learning okay unsupervised learning as well as the reinforcement [00:09:35] learning okay unsupervised as well as the reinforcement so under the supervised learning [00:09:40] that means we are having the level data okay level data so there is a two kind of problem [00:09:47] we are solving one can be the regression kind of problem and other one is the classification kind [00:09:53] of problem okay after that there is a unsupervised so here we are solving through the clustering [00:10:01] okay through the clustering while reinforcement is the different thing that can be based on the [00:10:06] feedback based kind of thing is there okay so this is the different thing but so we need to [00:10:13] learn the regression as well as the classification as well as the clustering in this particular thing [00:10:19] okay so this complete thing is there so based on the problem definition based on the problem [00:10:26] definition we need to decide whether we need to apply the regression whether we need to apply [00:10:31] the classification or whether we need to apply the clustering okay so based on the data set [00:10:39] as well as the problem definition okay sorry problem definition we need to decide okay so [00:10:49] when we are applying the supervised learning whenever our data set is in the labeled manner [00:10:55] okay labeled manner that means we are having the class level as well as the class data is there [00:11:02] so in that particular case we are going to treat the things as a supervised learning otherwise if [00:11:08] it is the unlabeled data okay unlabeled data then we can say that can be solved using the [00:11:16] clustering okay that can be solved using the cluster that is the thing now if our data set [00:11:23] is the labeled one what do you mean by the labeled one just like a stock market data [00:11:28] or the house price prediction that means this is the number of bedroom this is the number of rooms [00:11:34] number of this number of this locality then after at the end there will be the price okay there will [00:11:42] be the price so this kind of data set is there that means this is the labeled data okay and where [00:11:48] the unlabeled just like imdv data okay where the labeling is not there all the data all the grocery [00:11:55] data just like a dmart if you are going to the dmart you are getting that so that kind of situation [00:12:00] is there so if if our data state or if our dependent variable that means there are the [00:12:07] two thing is there there is an independent variable as well as the dependent variable [00:12:11] i am revising the thing after that we can go ahead okay all the information are known by you [00:12:19] but the thing is i need to revise that particular thing so that we can [00:12:23] go ahead with the linear regression okay so there is a two kind of feature is there okay there are [00:12:32] lots of features there but you are we are having the two kind of feature we need to discriminate [00:12:38] if we are talking about the supervised learning okay then we are having the two kind of feature [00:12:45] one is the independent feature okay and second one is the dependent feature okay [00:12:51] dependent feature or independent feature that means the dependent feature are those that we [00:12:59] need that all are dependent on some other factors just like the house price prediction that means [00:13:06] house price it can be depend on the where that particular house are located what are the bedroom [00:13:15] what are the carpet area what are these particular thing how on which flow that particular [00:13:21] thing is there so whatever this all are this all are the feature okay so this others feature can [00:13:28] be the independent for that dependent feature either we can call the dependent feature as a [00:13:35] output feature target feature or the dependent features all three terminology are the same [00:13:41] while we are talking about the independent so we can say the independent feature [00:13:46] input feature or the source feature all the things are the very much same so all three are the [00:13:54] very much same okay all three are the very much same all three are the very much same kind of [00:14:02] feature is there okay so this is called as the uh independent versus dependent now our independent [00:14:10] feature or dependent feature is not a fixed thing that means suppose that there is a [00:14:17] automobile data set up okay i am talking about the automobile data set in the automobile data set [00:14:23] there is a engine size is there engine mileage is there you can see the changes number is there the [00:14:32] car color is there or the car price is there that means lots of things are there okay lots of feature [00:14:39] is there suppose that our problem definition is that we need to predict the car price okay [00:14:46] if suppose that we have to ask about that we need to predict the car price then according [00:14:52] to the problem definition this will be the dependent feature while other can be the [00:14:57] independent feature for that okay now one more thing one more thing suppose that suppose that [00:15:05] if we need to find out we need to predict the engine mileage okay if we need to if our problem [00:15:11] definition is the engine mileage then engine mileage should be the dependent feature while [00:15:17] other can be the independent feature so that means on one data set there is a not the fixed thing [00:15:25] okay not the fixed thing that this will be the dependent feature or this will be the independent [00:15:29] feature okay we need to decide okay we need to decide based on the problem definition okay [00:15:41] once we are deciding the independent feature and the dependent feature then our next target is that [00:15:48] if our dependent feature if our dependent feature can be the continuous data [00:15:55] okay continuous data that means it is increasing or decreasing whatever the thing is there [00:16:02] if our dependent feature just like i am saying the car price [00:16:06] okay that can be the 10th 10 lakh or 15 lakh okay the 17 lakh like this so this can be the [00:16:18] continuous data okay suppose that or we can say house price that is the 15 50 lakh 60 lakh 70 [00:16:26] lakh like this so this is also the continuous data age of any person 15 16 17 okay height of [00:16:35] any person 7 8 sorry 7 feet 6 feet the 5 feet all these are the height so suppose this kind of [00:16:45] feature is there this kind of data is present in the dependent feature then we can say this can be [00:16:51] the continuous data and if we are having the continuous data in the dependent feature then [00:16:57] we can say we need to apply the regression over this okay this can be used the regression we [00:17:05] need to use okay so this is the regression okay so this is the regression kind of thing [00:17:16] now if our continuous date oh sorry if our dependent feature if our dependent feature [00:17:24] is having the discrete class okay discrete class discrete class ka meaning kya hai just like there [00:17:34] is a different classes there that means the true false spam not spam okay abnormal normal okay [00:17:48] good better best so this kind of zero one two that means class a class b class c [00:17:58] suppose that this kind of classes is there that means this can be called as the [00:18:02] discrete classification discrete class if suppose that your dependent features should be like this [00:18:09] okay then we need to 100 percent apply the classification for that okay we need to 100 [00:18:16] percent apply the classification on that so based on this based on this we are we need to we are [00:18:25] having the different different algorithm so for the regression and for the classification there [00:18:34] are different different algorithm is there so regression means the continuous data then here [00:18:41] the discrete data okay so this is the major example or the major thing that we need to take [00:18:48] care so in the regression what kind of algorithm is there so the very important is the linear regression [00:18:55] okay the second is the polynomial regression or multi full linear regression [00:19:08] okay so this is the first point this is the second point this is first point now here [00:19:13] the algorithm name algorithm name will be the so logistic regression [00:19:18] okay logistic regression is used for the classification svm knn or the nav base [00:19:28] okay this all can be used for all can be comes under the continuous kind of thing okay so after [00:19:38] that we need to evaluate the model okay after that we need to evaluate the model so for the [00:19:45] evolution for the evolution we need to have a different different matrix is there okay we need [00:19:51] to have a different different matrix matrix there will be the evolution parameter is there that [00:19:56] whatever the prediction model will give okay how that predicted thing can be different from the [00:20:04] actual and how we can determine so for determining that we need to use okay we need to use what [00:20:11] things here we are using the r square here we are using the ma e here we are using the msc [00:20:20] here we are using the rmse so this all are the evolution parameters so this is all the [00:20:25] mathematical formula is there we will see and discuss that in the coding part also okay while [00:20:32] in the classification we are having the what kind of thing is there yes cross entropies we have a [00:20:41] one kind of things are in under this okay cross entropy is there now if the classification is [00:20:47] there we need to find out the accuracy f1 score precision recall all the thing is there all the [00:20:59] thing is there okay all the thing is there so this is all about the classification as well as the [00:21:05] regression okay so this is all about the classification versus the regression anybody [00:21:11] having any doubt then otherwise we'll start the very first algorithm under the regression okay [00:21:19] I hope this can be the perfect recap okay this will be the perfect recap so that you can able [00:21:24] to understand okay so now we'll start with the linear regression okay now we are start with the [00:21:31] linear regression so i need to switch the thing so that we can move ahead with the linear regression [00:21:42] okay so i am directly i am not explaining the things with the bpt and all i am directly moving [00:21:50] to the uh coding part okay so that you can able to learn okay yeah sir what is the difference [00:21:58] between the accuracy and f1 score yes i will tell that particular things in the uh classification [00:22:04] part but right now if you are asking then i will tell the that i'll tell in the detail so the [00:22:10] accuracy is just like whatever the y prediction is there and what is the x y test is there so we need [00:22:16] to make a difference and we need to calculate in the form of uh in the form of uh what we can say [00:22:24] in the form of percentage okay but the f1 score is the harmonic mean to get the things between the [00:22:33] we are getting the harmonic mean of the precision and recall then we are saying the f1 score so [00:22:38] before we are going to one score we need to understand the uh sorry confusion matrix then [00:22:45] only we can go okay sir can you please confirm what uh the cross entropy is used to measure the [00:22:52] error for the classification use case yes hundred percent we need to find out the error in the [00:22:57] classification okay the cross entropy is the thing that what is the predicted value is there we need [00:23:05] to get the predicted minus the actual and we are doing if we are doing with the binary manner then [00:23:11] we are going to square then divided by the one by two okay divided by one by two so that can be used [00:23:18] okay so the cross entropy is the hundred percent measure that can be used to find out the error in [00:23:23] the classification that means after the classification the value should be comes as a [00:23:30] one here the one anything like in the value comes as a 0.9 then 1 minus 0.9 that can be the cross [00:23:38] entropy or that will be the formula is there for the cross entropy there is a perfect formula is [00:23:44] there so we will understand that okay so that is all about the that particular thing now we'll [00:23:53] start with the linear regression so i am uh explaining that particular things in the scratched [00:24:00] manner okay i am not telling that particular things directly with the scikit learn okay because [00:24:06] this is the first algorithm so you need to understand that things in the very detailed [00:24:10] matter okay now there is a thing that means we are having the two features so in the linear [00:24:17] regression there is a restriction that we need to choose only the one dependent variable as well as [00:24:24] the one independent variable okay here is a restriction in linear regression that is a [00:24:33] hundred percent fixed but we can only choose the single independent variable okay we need to choose [00:24:39] the single independent variable and that can be the y and that can be the x now we need to [00:24:45] put the point or we need to see the data distribution or data distribution showcase [00:24:51] we need to make a prediction line or we need to make a regression line over this okay so the [00:24:58] regression line per point plot that will be the predicted point and what is the actual data [00:25:04] distribution is there suppose that here all the blue point can be the actual data point while this [00:25:12] single line or this is the linear line can be the uh our predicted line okay so if i am explaining [00:25:19] this particular things over there so there is a one feature is there in the house just like this [00:25:25] is the house price or the suppose that the independent feature is the uh locality suppose [00:25:32] that okay so suppose if we need to plot that particular things like this so this is the data [00:25:38] distribution now we need to make a one mathematical model that can give the or mathematical model [00:25:46] means the linear model that can give the proper prediction so we had created the one single line [00:25:53] okay so this will be the predicted line is there and all that can cover all the data point okay [00:25:59] so yeah data point data point this will be the actual so now the predicted value of this can be [00:26:06] here this can be here this can be here this can be here okay so this particular thing is there so [00:26:13] this is called as the linear regression although this is the very inaccurate kind of uh is there [00:26:20] this is the very inaccurate because if the data distribution is in the linear manner [00:26:26] the model linear regression will perform in the very well manner if it is not in that particular [00:26:32] linearly say preval then we are saying this will not give the proper answer so how we can draw this [00:26:38] particular line we can draw this particular line is from the linear line equation that will be the [00:26:44] y is equal to mx plus c okay that means this is the output and this is the input that means input [00:26:52] means that this is the independent variable and this is the dependent variable so based on this [00:26:58] and this this will be the training data so y and x will be the training data so based on the training [00:27:05] data or from the independent independent variable we need to identify m as well as the c okay so m [00:27:12] is the slope okay then c is the intercept okay that we need to get so if slope or intercept [00:27:18] milne ke baad okay slop or intercept milne ke baad we are getting or we are trained the model [00:27:25] okay so now we had trained the model and how we can train that y is equal to suppose that your [00:27:31] m will be the 1.5 and x then there is a suppose that your c will be the 2 okay suppose that this [00:27:39] mathematical equation may come so whenever the new x come that means whenever the new independent [00:27:45] variable comes then you can predict just like this is five then this will be the answer okay [00:27:52] that means 9.5 will be the answer so this can be the linear regression equation okay this can be [00:27:58] the linear regression equation is there so i am explaining these particular things with the help [00:28:03] of this okay so i am introducing the linear regression okay i am introducing the linear [00:28:10] regression so linear regression is the very simple and the oldest thing is there that can be widely [00:28:16] used for the supervised learning uh the slope slope is just like in the mathematics you had [00:28:22] understand there is a two point is there that uh the that two point i'll explain i'll i'll explain [00:28:27] once the slope will come you will understand that particular thing right now you need to understand [00:28:32] the slope as well as the intercept okay i'll tell okay from the visualized manner i'll tell [00:28:39] that particular thing so this is the basically the starting point of everything so the linear [00:28:45] regression is the linear approach that can be followed the relationship between the [00:28:50] dependent and the independent variable so here the thing is that one independent variable here [00:28:56] you can see the one independent variable because we need to always choose the dependent the single [00:29:01] dependent variable variable in every every algorithm it's a single dependent but independent [00:29:09] variable multiple but in the linear regression there will be the restriction that we can choose [00:29:14] only the one independent variable okay so what is the prerequisite for that that we need to [00:29:20] understand the python programming as well as the basic algebra as well as the basic aesthetics okay [00:29:27] so that it will be the thing so what i am i am explaining so we need to import the pandas as the [00:29:34] pd numpy as the np matplot lib dot pyplot splt c1 snc okay this all things we understand okay this [00:29:43] all things we are already understand because in the last classes we had did so many work okay so [00:29:48] we are not explaining that particular thing right now now main thing what is our objective what is [00:29:54] our objective our objective in this particular uh lab or this particular lecture you need to [00:30:02] understand the theory behind the linear regression that you need to understand the mathematical part [00:30:07] okay we need to understand the mathematical part to able or the second thing we need to able to [00:30:13] create the simple linear regression okay we need to build the simple linear regression without the [00:30:19] machine learning library so we can build we can build our linear regression from the two way [00:30:26] that means through the mathematically or through the machine learning library so we are implementing [00:30:32] in the both way okay both way after that we need to see the machine learning [00:30:40] library through the machine library learning library you can implement that things in the [00:30:45] just five line but if you are doing that particular things with the math then you will take the lots [00:30:51] of time okay but if you need to learn or if you need to understand the linear regression then the [00:30:58] mathematics behind that need to be understand okay so in this we need to understand the mathematics [00:31:04] so the we need to implement our linear regression model for predicting the price of the car so we [00:31:11] are having the one automobile data and in the automobile data our problem definition is that [00:31:16] we need to predict the price of cars now we have to predict the price of cars [00:31:21] so what are we doing is a regression kind of problem so regression kind of the problem [00:31:26] okay so this is there now we are first starting with the we need to understand the linear regression [00:31:33] okay so before we get to our dirty on the coding on the linear regression [00:31:40] we need to understand what the what the things we need to require so the following cell are aiming [00:31:45] the mathematics okay so what things we need to understand the linear regression is the method [00:31:51] that are used to define and measure the relationship between the independent feature [00:31:56] and the dependent feature so i had already explained there is an independent variable is [00:32:01] there and independent variable will be the x and dependent variable will be the y okay now linear [00:32:07] regression need to be predict the target variable by estimating a line that can be best fit for the [00:32:15] relationship between the x and y that means we need to choose the x and y and x can be the [00:32:21] independent variable while y is will be the dependent variable so based on the x and y we [00:32:27] need to make a best fit linear relationship okay so best fit line we have to draw [00:32:33] that can be make the best fit okay so how we can draw the best fit line okay how we can draw the [00:32:42] best fit line so the dependent variable is sometimes called as the outcome variable and [00:32:46] that can be the response variable also so dependable variable is the variable that we will try 100% [00:32:53] 100% the dependent variable is that that particular things that we need to predict okay so here we [00:33:00] need to predict the car price so car price will be the dependent variable while other can be the [00:33:06] independent variable so out of this we need to choose the single independent variable and how [00:33:11] we can choose that i'll tell how to know when we can use the linear regression i told i had told [00:33:18] already in here already here suppose that your data set is in the continuous manner okay your [00:33:24] dependent variable is in the continuous manner then you need to apply the regression okay and [00:33:30] regression under you can apply any algorithm linear regression apply polynomial or multiple [00:33:36] okay it's your choice but the first algorithm is the linear regression okay first algorithm is the [00:33:42] linear regression so you can use the linear regression but linear regression will be [00:33:46] performing well when the your data is in the linear manner if your data is in non-linear manner [00:33:53] okay so this is the answer now the linear equation what is the linear equation the linear equation [00:34:03] is just like this y is equal to mx plus c either you can call the mx plus c either we can say [00:34:10] the beta 0 plus beta 1 into the x that what is the meaning behind this the x is the independent [00:34:17] while the y is the dependent while beta 0 will be the intercept okay why beta 0 is the intercept and [00:34:25] why beta 1 is called as the slope okay while that can be the slope so this is the terminology that [00:34:31] we need to understand if you need to understand these three the mathematics those people are [00:34:36] already know the mathematics in the uh 10th or 9th 10th 11 12th then they are definitely know [00:34:43] about the linear regression that what is the slope what is the intercept what is this so this is the [00:34:48] linear line equation so we need to draw the linear line that can be the best fit between the independent [00:34:54] variable and the dependent variable that we need to draw so uh the objective i need to tell one [00:35:01] more time that we are having understand that particular things okay understand that particular [00:35:07] thing we are having the input sorry we are having the independent variable and the dependent variable [00:35:16] we need to draw the data distribution between the independent variable and the dependent variable [00:35:22] then we need to make a best fit line over that particular point in the linear through the linear [00:35:30] equation okay that can be best fit between the that two uh independent as well as the dependent [00:35:38] so how we can draw so there is a one formula that the linear line formula is there that will be the [00:35:44] y is equal to mx plus c so m will be the slope while c is the intercept similarly here the y is [00:35:51] equal to beta 0 plus beta 1 into x all the things are same beta 1 can be considered as the dip inter [00:35:58] the slope as well as the beta 0 will be the intercept okay so this is there now we need [00:36:03] to make that particular equation into the python code okay that will be the we need to define we [00:36:10] need to define the linear okay we need to define the linear and that will be the what things we [00:36:15] need to give x in the input beta 0 into input and beta 1 is in the input so we need to we need to [00:36:23] only implement that particular equation so function create correct that will be the defined linear [00:36:29] inside this we are given these three things that will be the beta 0 beta 1 as well as the x [00:36:34] now at the end what we need to return that will be the b0 plus b1 into x for x in x for x in x [00:36:44] that means every time the x can be the multiple value so we are taken a cake value okay single [00:36:50] single value we are taken and we are finding the linear line okay we are finding the linear line [00:36:56] so this is how we are getting the y okay this is how we are getting the y so we had implemented [00:37:02] that particular things then that will be the linear line okay that will be the linear line for us [00:37:10] now the next thing now the next thing is there will be the most [00:37:14] important thing and you had already asked about sir what is the slope and what is the [00:37:19] the intercept here you can clear each and everything how to get this node i'll upload i'll upload this [00:37:25] particular notebook okay x can be the set of value x can be the set of value and x can be the single [00:37:30] value also okay it might be possible okay it might be possible then we can give the [00:37:38] single value if we need to test on the multiple value you can test on the multiple value [00:37:42] where you will get the multiple y okay where you get the multiple y for every x there will be the y [00:37:49] okay now beta 0 and beta 1 we need to estimate it through the training data that means we need to [00:37:58] train the model and we need to get the best suitable beta 0 as well as the beta 1 [00:38:04] we need to make a best fit line best fit line ka meaning kya hota hai that means we need to get [00:38:11] the best fit slope as well as the intercept yadhi hum best suitable beta 0 or beta 1 find [00:38:19] out kal lenge that is the thing that is that means that can be the best suitable line yadhi [00:38:25] humne beta 0 beta 1 ko sahih tariqa se find out kal lya we can draw the best fit line okay so [00:38:31] beta 0 and beta 1 can be the can be estimated from the training data and training data kiske [00:38:37] under a training data hey x or y will be the training data okay x and y will be the training [00:38:43] data that will be comes under the independent variable and dependent variable now the beta 1 [00:38:49] can be called as the scale factor okay now beta 1 can be called as the scale factor or the [00:38:55] coefficient and the beta 0 is called as the coefficient now beta 1 can be the called as [00:39:01] the scale factor or we can say the coefficient you can say okay they can tweak the to find the [00:39:08] best fit line between our variable okay that can be the best fit line so if we can find the best [00:39:14] fit coefficient then we can get the best fit line so how we can determine now beta 0 beta 0 is an [00:39:23] intercept that will be the also called as the c whenever we are talking about the y is equal to [00:39:28] mx plus c bar bar y is equal to mx plus c normally we are using the y is equal to mx plus c [00:39:34] but in the coding part or in here we can use the different nomenclature it's up to you you can [00:39:40] choose the y is equal to mx plus c also but yaha beta 0 ki jage c for replace okay that will be [00:39:47] the variable then you can change now beta 0 is equal to y dash minus beta 1 into x bar and what [00:39:55] is sorry x bar or y bar what is the x bar and y bar x bar and y bar is the mean of that particular [00:40:03] feature okay we need to see the mean value of mean value of dependent variable okay mean value of [00:40:13] dependent this is the fixed formula we can't we can't do anything okay that will be the y bar [00:40:19] minus beta 1 into x bar that means intercept find [00:40:23] करने के लिए पहले हमको slope find out करना पड़ेगा [00:40:26] okay and x bar क्या हो गया independent variable का mean [00:40:30] and y bar क्या हो गया dependent variable का mean [00:40:33] so we can find out beta 0 equal to y bar minus beta 1 into x bar [00:40:39] okay now we need to find out the beta 1 [00:40:42] okay because intercept can be dependent on the beta 1 [00:40:46] and d beta one can be called as the coefficient or the slope and what is the slope now i'll tell [00:40:52] the answer the x i that means x i minus x bar y i minus y bar okay x i minus x bar means x bar will [00:41:02] be the complete mean and x i is the single single value suppose that there will be the 10 value is [00:41:07] there okay suppose that here the independent variable is there that will be the x and that [00:41:14] will be the y here the car price 10 leg 15 leg 16 leg 8 leg 9 5 leg like this and here the value [00:41:24] is just like suppose that any value is there that will be the 10 15 12 13 4 31 like this this can be [00:41:33] the value so we need to find out the x bar that means we need to find out the mean of this okay [00:41:40] also we need to find out the y bar that mean of this okay so this will be the if and what is the [00:41:47] xi xi is the first value that 10 minus suppose that mean will be the 29 so 10 minus 29 okay it [00:41:57] is there okay this will be the xi minus the mean where the y i minus the b that means this is the [00:42:05] 10 and y bar could be the suppose that uh 9 then 10 minus 9 then we need to do the multiplication [00:42:12] when we get the we need to do the summation so this is the formula okay this is the formula that [00:42:20] xi minus x bar yi minus y bar and this is from 1 to n then whatever the observation is there we [00:42:26] need to get then we need to divide that xi minus x bar complete square is there and this is how we [00:42:35] got the beta one is it possible to share the notebook prior to call so we can execute no no [00:42:42] need to execute right now i didn't execute anything when execute the important thing is that you need [00:42:49] to understand the concept okay you can you can't do because only i need to understand you okay [00:43:00] it will take the time in the till the next level okay it will take the time but i'll provide [00:43:04] hundred percent i will provide okay it will run in the just five minute but understanding [00:43:12] can takes the one hour or two hour okay it will take the two hour okay understanding is important [00:43:19] okay so right now you need to understand i am telling little bit slow manner okay little bit [00:43:24] slow manner okay so right now you need to understand you had understood about the [00:43:32] slope how we can find out the slope slope means the x i okay what is the x i x is that particular [00:43:40] point minus the x bar that will be the mean y i that means the that particular point in the [00:43:45] dependent minus the dependent mean then we need to multiply and we need to sum till the whatever [00:43:51] the number of observation is there then divided by the x i minus x bar and we need to do the square [00:43:57] of this and we need to get so this is how we got the beta one i thought slope is the y mean minus [00:44:03] yi divided by x mean minus x that is also the one formula okay that you are uh you are telling the [00:44:15] y mean minus yi and x mean minus xy this will tell the the ratio between the dependent and independent [00:44:24] this is the formula if you can check the formula over the internet also you will get the same [00:44:30] formula okay you will get the same formula okay here the formula is like this okay here the [00:44:36] formula is like this you can also see on the internet okay yeah now the intercepts once we [00:44:44] are getting the beta one once we are getting the beta one okay once we are getting the beta one [00:44:50] then we can check with the beta zero okay so you can see okay you can see that particular thing [00:44:58] okay so once we are getting this particular thing so here you can see okay uh we can have a one more [00:45:06] formula for the slope okay we have one more formula for the slope that will be the i can write here [00:45:13] okay i can write here this will be also one kind of formula is there that n [00:45:19] submission of x y okay this will be the one thing minus submission of x [00:45:28] into multiply by submission of y divided by n submission of x square okay minus [00:45:38] summation of x square this is also one formula both are given the same thing [00:45:44] okay both are given the same thing you can choose any one of the formula [00:45:49] okay any one of the formula okay you can see on the internet also that can be the formula for the [00:45:56] slope okay yeah so this is also the correct formula i i understand that particular is a [00:46:02] formula okay so this is there now once we are finding the beta one we need to get the beta zero [00:46:08] so we got the intercept okay we got the intercept okay so here the y will be y days will sorry y [00:46:16] bar will be the mean of the dependent beta one is the this is the mean for the existing linear [00:46:23] line but we are finding the slope to get the yes 100 percent because we are having that [00:46:29] given data so we need to find out okay so the beta one is the slope intercept while x bar is the [00:46:37] mean for the independent value okay so this is there i i hope you can understand the formula [00:46:47] okay now we need to implement so for the implementation we need to little bit [00:46:52] simplify the formula okay we are simplify the formula that what is the denominator what is [00:46:58] the numerator is there we are calling this numerator as a rice okay we are calling the [00:47:04] rice we are given the one variable name okay that will be the rice and the denominator can [00:47:12] be called as the run okay so we need to whenever we do need to divide the rice divided by the run [00:47:18] then we can get the beta one so beta one can be like this okay so beta one can be like this that [00:47:25] will be the divided rise divided by the run so this is called as the slope okay this is called [00:47:31] as the slope so this is called as the slope that beta one so if we need to implement okay we got [00:47:38] the formula plus formula ko mathematically we got now we need to convert that particular into the [00:47:45] programming now we can see now we have linear linear linear linear line what the thing is [00:47:51] there x we are having beta 0 beta 1 now we got the beta 0 and beta 1 from here now we need to [00:47:58] implement so we need to first define the function for the beta 0 okay beta 0 find out so we need [00:48:06] to define the intercept and the intercept contain the x as well as the y and we need to get the [00:48:13] b1 okay so x or y what is then x and y x y are the independent and the dependent variable and we [00:48:21] need to get the v1 why so here you can see x key need y key need here we can find the x bar this [00:48:33] will be the x bar and this will be the y bar so x bar ka meaning kya hai x ka mean lelo or y bar is [00:48:40] the y ka mean lelo okay so we got the x bar and b bar now we can see the y bar minus b1 into x bar [00:48:51] okay and how we can get the b1 b1 ke liya hume a core function draw karna padega i hope this [00:48:58] particular the normal programming to me idea ho ga ki function hum kaise bana rhea function ko call [00:49:03] case if i need to explain this we cannot finish the linear regression on time okay so this is the [00:49:11] implementation okay this is the implementation okay now we need to also we need to also implement [00:49:19] the slope okay slope ke liye humare paas formula hai to so slope ka formula kya hai this will be [00:49:25] the slope formula the xi minus x bar yi minus y bar divided by the xi minus x bar x bar ka complete [00:49:32] disquire so how what things are required to identify the slope slope find out [00:49:38] currently requirement only the x y so we have a x as well as the y because x or y [00:49:44] now what is the x bar okay now what is the x bar so x bar will be the n p dot mean and [00:49:52] y bar is the y mean so these things we had to understand now we had written the rise [00:49:58] divided by run so that we can simplify our equation suppose that this is the rise okay [00:50:04] rise we need to implement okay the numerator x i minus x bar y i minus y bar this [00:50:12] we have formulaic formulaic that rise will be the sum of sum means the this sum the [00:50:20] summation is there so summation directly here then x minus x bar into y minus y bar [00:50:28] और हमें X और Y, X और Y कहां से मिलेंगे, that means there will be the complete X और Y is there, उसके अंदर जो single-single value है, that will be the X and Y, okay, यहां पर small X and Y है, and there will be the complete, here the capital X Y, okay, capital X Y के अंदर जो independent, sorry, the individual variable है, sorry, individual values है, that can be called as the simple X, sorry, [00:50:56] the small x as well as well as the small y so capital x and y are the independent variable as [00:51:03] well as the dependent variable but simple small x and small y can be considered as the individual [00:51:09] value that are comes under the x and y okay and while the x bar and y bar can be called as the [00:51:16] mean okay so this is how we can get the rice okay rice similarly we have to find out the run [00:51:25] run we find out earlier submission of x minus x bar and it's square okay square we need to write [00:51:32] this and zip zip is the complete package is there that means x and y are the complete jipping is [00:51:38] there and we can call the simple normal x and normal y that will be the small x and small y [00:51:45] from that particular zip okay zip is a function zip is the one function that can hold the complete [00:51:52] data so x or y can be the complete zip if this is there so this complete is comes under the x [00:52:02] and this complete comes under the y now if we need to call the small x from that [00:52:11] zip so first 10 will be called now small y then this 10 lakhs will be called so [00:52:17] So, this and this will be called, then next 15 or 15 call, then 12 or 16 call, like this, this can be the, the zip is the complete package of X and Y, okay, now we have to divide, rise and run, divide and that will be the R beta 1, okay, that will be the beta 1, okay, that will be the beta 1, so we need to return the rise versus run, so rise versus run, [00:52:43] we will get the slope [00:52:45] and once we are getting the slope [00:52:47] so slope where do we go [00:52:49] paste? intercept [00:52:50] where do we go [00:52:52] intercept? and x and y [00:52:55] we already know [00:52:56] and after that we can return [00:52:58] so this value [00:53:00] this returning value can be called as the [00:53:03] this returning value can be called as the [00:53:05] beta 0 and this can be [00:53:07] this returning can be called as the [00:53:09] beta 1 [00:53:10] beta 0 and beta 1 [00:53:12] okay this beta 0 and beta 1 can be called as this okay so here we have rise versus run [00:53:28] okay is it possible yes hundred percent i'll share the notes hundred percent [00:53:32] once i am finishing this particular thing i'll just upload the notes okay you can see [00:53:40] i can you explain the sequence of running code one after another hundred percent one after another [00:53:46] i but what the thing is that right now i am not making any code i am making only the three things [00:53:53] just like a function calling is there function call ka matlab kya hota hai you need not to worry [00:53:59] about each and everything we have linear line equation that is the y is equal to mx plus c [00:54:06] sorry y is equal to beta zero plus beta one into c is co implement car liya is co implement [00:54:14] now for this what things are required sorry x okay x sorry sorry okay this is there this is [00:54:22] the first thing we had dropped now the second thing for finding this because we only know the [00:54:28] x and y okay now beta 0 or beta 1 ki requirement so we need to find out the beta 0 beta 0 is just [00:54:36] like y bar minus beta 1 into x bar so is ke liya beta 1 ki need padhi so beta 1 ki need padhi so [00:54:44] beta 1 is just like a rise divided by the run this is there so we had implemented this thing [00:54:51] so that from here we got the beta 0 sorry beta 1 here we got the beta 0 so we can put this [00:54:58] particular value and this particular value here now only we need to find out the x and y so that [00:55:03] can get so this is the generalized thing is there this is the generalized is there okay [00:55:10] okay so you need to understand but the thing is that once we are requiring that particular [00:55:18] things we can write okay only the function calling is important okay [00:55:25] just the definition here that is the correct one okay now we are finished we are finished [00:55:35] the complete thing we had built the linear line we had built the beta 0 we had built the beta 1 [00:55:42] now we need to give the x and y that particular things are the fixed thing whatever our x y is [00:55:49] there we can put that particular things into the that particular equation we can get okay we can [00:55:55] get to have a x or y find out how we can determine the x and y how we can determine the x and y for [00:56:02] determining the x and y for determining the x and y for determining the x and y what we need to do [00:56:11] we need to get the data set and from that particular data set we need to determine [00:56:16] our dependent variable as well as the independent variable okay so if we need to so first thing [00:56:24] abhi tak only we had designed the complete mathematical things in the programming okay [00:56:30] now our task is to define the x and y okay our our task is to define x and y because we build [00:56:38] we build this three things sorry yeah we build this three thing is coding so first thing is [00:56:47] that we need to find out the x and y because this is the training data okay this is the training data [00:56:55] training data is the given thing okay the given thing is the x and y okay the given thing is the [00:57:02] capital x and capital y will be the given thing because we are having the data i mean data set [00:57:09] we can design that particular once we are getting the x and y then only we can first determine the [00:57:16] beta 1 then we are determining the beta 0 then we are determining the beta 0 plus beta 1 into x [00:57:24] so that we can find out the y so based on these two feature or based on these two variable we [00:57:32] need to determine the beta 1 and beta 0 so that we can put that particular value over there so [00:57:38] whenever the new x may come okay we can put here so that we can identify our y value and that is [00:57:47] the machine learning and that is the regression okay that means we need to first do the training [00:57:53] training that means we need to give the x and y and we need to determine the beta 0 and beta 1 [00:58:01] that will be the best of beta 0 or beta 1 on the this particular x value so we can design the [00:58:09] best fit line okay okay i'm using linear line so we can design that is the better line okay [00:58:16] is the slope constant across all range of array all range of array all range of array that means [00:58:23] i didn't get the thing the slope formula is fixed you can put that particular value and you can [00:58:29] determine the different different slope over there okay slope will not be fixed the formula is fixed [00:58:37] you can put any value okay there is a one more question if we have already have a x and y then [00:58:43] why we are required to find we need not to require the x and y okay we need not to require the x and [00:58:49] y and x and y are the given thing okay we don't have x and y are the given thing [00:58:57] data sets we need to calculate the beta 0 and beta 1 and beta 0 and beta 1 calculate [00:59:05] meaning we need to provide the training model under we need to do that particular thing [00:59:13] i am able to understand but i hope so i am little bit explaining [00:59:22] x or y given that will be the data set okay and this will be the training data okay training [00:59:35] करना है model की model की training करने के बाद हमें क्या मिलेगा x or y is the training data training करने के बाद हमको क्या मिलेगा that is beta 0 and beta 1 so that beta 0 and beta 1 or beta 0 and beta 1 जैसे [00:59:49] ही मिलेगा we can draw the mathematical line to beta 0 beta 1 ही हमको best find out करना है this is the mathematics behind the model okay this is the mathematics [01:00:01] behind the model so beta 0 and beta 1 we need to find out with the help of x with the help of given [01:00:09] x and y given x y we need to find the best suitable beta 0 and beta 1 so that we can design so [01:00:20] whenever the new x comes so we can determine predict that will be the correct [01:00:29] value okay that will that will be the predicted value okay suppose that x is the coming new x [01:00:36] coming so x and y and we need to predict on the new sample new out of the box so whatever the y [01:00:48] value is there this will be the y value so on this x value this will be the y value so this is called [01:00:55] is the predicted value okay this will be the predicted value now we need to understand [01:01:00] and one more question is there hello sir could you please explain how the formula for vita1 is [01:01:06] derived in the linear regression is this something we simply need to yes hundred percent you need to [01:01:12] memorize okay you need to memorize we are not driving it is the fixed formula for the slope [01:01:18] there is a fixed formula for the uh intercept there is a fixed formula the formula is never changed [01:01:24] okay it is the formula for x and it is the formula for linear regression so you need to keep remember [01:01:30] that particular thing the formula for the slope and formula for the intercept you need to keep [01:01:35] remember and you need to give the x and y so that you can determine the beta 0 and beta 1 [01:01:41] okay after training we only need huh after training we only need x and y because training is there [01:01:48] Training का मतलब क्या है बीटा जीरो और बीटा बन का मतलब क्या है we need to design or we need to make these predicted line और यह predicted line बनाने के लिए क्या चब रहत है बीटा जीरो और बीटा बन की need है that means we are having the x value or we are having the y value okay that based on this x and y value we need to make this line okay [01:02:12] this is the model this linear line is our model so now if we need to evaluate the model [01:02:34] that we need to give the random x [01:02:37] so that it will predict the y [01:02:41] this is there [01:02:43] so we need to provide the x [01:02:45] and the model call [01:02:47] and predict the y using [01:02:49] yes it is correct [01:02:50] it is very much correct [01:02:52] that whenever [01:02:54] we had trained the model [01:02:56] we had trained the model [01:02:58] so whenever we need to [01:03:01] give the x value [01:03:02] I hope I think you are not able to understand this thing that we need to give the input and [01:03:25] need to also give the output and we need to get the model or we need to extract that particular [01:03:34] model okay we need to extract that particular model that means we need to give the x and we [01:03:40] need to give the y and we need to drive the mathematical model and that mathematical model [01:03:46] so whenever the new x come new x come then it will give the y okay yeah but training [01:03:53] i hope because this is the most important thing okay [01:04:07] vikas sarma what if we won't even have the x and y both value [01:04:14] so how would model take predictors okay you are again confusing i am telling i am telling [01:04:19] just understand this particular thing there is a house price prediction okay okay so what machine [01:04:30] learning will do there is a feature is there the first feature is the community [01:04:40] okay locality okay there is a one more thing is there number of bedroom number of washroom [01:04:47] then here's the price suppose that this is the data set okay there is a data set there is a [01:04:54] data set okay suppose that this all are the data set okay there are lots of so that means these [01:05:00] these these these this and there is the one price is there you need to understand because this is [01:05:05] the most important thing i want to tell so this this this this this this this this this like this [01:05:12] okay there are lots of data set is there okay you there are lots of data set is there now [01:05:17] We need to train. Now we are converted. This is the dependent variable and this all are the independent variable. So this all are the X and this all are the Y. So based on this data set, we need to give the. So this X and Y are the given thing. [01:05:33] this is the data and this is the data that means [01:05:40] when this this this kind of result is there our price is this this this this result is there our price is this [01:05:51] so this we had trained the model on this data set okay [01:05:56] okay but out of the box data I out of the box data come now the new data comes that will give [01:06:05] the that our community is this our locality is this our bedroom is this and our washroom is this [01:06:13] then you need to predict the price okay so that means something model already so what [01:06:20] model pay yeah yeah yeah data that means we need to give the x data so that we can predict the y [01:06:28] and if y is not correctly predict then there will be the error this is this thing is called [01:06:35] as the machine learning okay i hope this particular things are about so this is the general solution [01:06:41] we can't use this method for other ml for training every everywhere wherever you need to apply the [01:06:47] regression you can apply this particular we can go for the beige gradient descent to [01:06:52] that is the important thing beige gradient descent is also one kind of thing okay but this is the [01:06:58] very initial thing that you need to understand and you should have introduced fire torches [01:07:04] that is the different thing back propagation is the uh deep learning concept okay i'll tell that [01:07:10] particular things after the one one month okay right now you need not to understand this basic [01:07:16] thing okay basic the thing is the very basic thing machine learning के अंदर क्या हो रहा है [01:07:23] okay now we need to provide the data हमने सारी equation बना ली now we need to provide [01:07:28] the data as per my understanding we first train our model based on the some set of data set once [01:07:35] it is trained we further used the model to calculate the new y value for the x with the [01:07:40] train model yes hundred percent right hundred percent right हमें कुछ data के उपर [01:07:45] पहले train करना है फिर जैसे ही new x मिलता है उसके इसाफ से भाई को predict करना है [01:07:50] that is the machine learning that is the machine learning okay और यह जो बेज ग्रेडियन [01:07:56] descent a big propagation don't be confused this all are the algorithm that are comes under the deep [01:08:02] learning we'll see that particular things but first thing is that we need to understand okay [01:08:07] now the thing is that we need to load the data set and we need to provide the x and y okay so [01:08:13] so we are having lots of data that means there are multiple thing is there one two three four [01:08:31] five there are multiple feature is there okay and at last the car price okay so there are lots of [01:08:39] independent variable is there and there are mostly uh output the dependent variable is there so this [01:08:46] is the data set is data set message welly cheese he we need to apply the linear regression through [01:08:53] on this particular data set okay is particular data set we need to apply the linear regression [01:08:59] so before we are going ahead we need to little bit explore that particular data okay okay data [01:09:06] the data set size and what is the number of row and what is the number of column is there [01:09:19] we need to determine the data save and the data save of 00 will give the row and one will give [01:09:26] the column so the data set size is there and what is the data set size the row is 205 is a row and [01:09:33] there is a 26 column is there okay there is 26 column is there okay this is the only this is not [01:09:41] the important thing only we need to explore that what is the inside the data set then there is a [01:09:47] column and there is a data type so pd dot data frame will tell the what is the data type so there [01:09:52] is the 26 feature is there symbolic normalized law us make fuel type aspiration number of door [01:09:59] for this type so what is the data type in this and what is the data type that integer float float [01:10:05] object integer so always in the regression we are always use the numeric kind of data [01:10:12] okay object type data we will not use in the linear regression linear regression will always [01:10:19] work over the numerical kind of data because regression ka meaning he who he is [01:10:24] if we are having the continuous kind of data then only we can apply the that particular thing okay [01:10:33] so this is there so this is the all the data type of this all the data type of this that means we [01:10:40] are having the price price will be the object data type and this will be the dependent variable while [01:10:47] we have a option of 25 data sorry 25 feature as an independent feature okay so we are having the [01:10:56] data price that means we are having the question mark at four place okay question market four [01:11:05] place so this will be the missing value kind of thing so we need to remove that particular value [01:11:10] okay that means wherever the price is there and it is not having the question mark [01:11:16] we need to use that particular price or price data type we had changed the price data type into [01:11:24] the integer because right here the object data type is there and the linear regression is work [01:11:29] only over the integer kind of thing so we need to choose so here you can see there are lots of [01:11:37] column is there but we are using the linear regression that can only deal with the two [01:11:42] variable there is a one independent and one dependent so that means we need to select only [01:11:46] the two columns so the first column is very much fixed thing because we have to determine [01:11:52] price determine the price can be the dependent while the other column that means [01:11:59] okay so dependent variable containing the full value as a question mark so that [01:12:08] we need to remove okay or other than this jitne bhi hai usko integer me convert kar diya okay [01:12:14] integer me convert kar diya only you need to listen that particular thing okay now there is a option [01:12:22] ki abh humare paas we have a lots of option to determine the to determine the independent variable [01:12:32] okay we have a lots of option to determine the independent variable and we have only one option [01:12:37] to determine the dependent so our price to fix as a dependent variable now we are having the many [01:12:45] column that can be one kind of independent now there is a one approach okay there is a one thing [01:12:53] that will tell about the relationship between the independent variable and the dependent variable [01:13:00] key to our price dependent variable because we had fixed the dependent feature as a price [01:13:06] okay now how this price can be affected or how this price can be correlated with the different [01:13:15] features so to find the relationship between the price with the other feature and that can be [01:13:22] done by the heat map so we need to find out the heat map that will be the sns dot heat map [01:13:30] and we need to find out the correlation score okay there is a correlation score is there so [01:13:36] i am explaining this so there is a fixed thing is there that price can be selected as a dependent [01:13:42] because based on the definition we had selected that means the price can be the dependent [01:13:47] now there is a independent variable we need to select because the linear regression is work over [01:13:54] only the single feature single independent so independently lots of choices so we need to [01:14:01] find out the relationship between the price with all the individual independent variable [01:14:07] okay independent variable relationship check with the correlation score so correlation is just like [01:14:16] correlation is just like the uh mathematical thing that will tell the that will tell the relationship [01:14:23] between the two features okay so how correlation kaysay nikalate hain covariance of x and y divided [01:14:30] by the standard deviation of x as well as the standard deviation of y so this is the formula [01:14:37] for the covariance so from this from these mathematical things we need to apply and we need [01:14:43] to find out the so that we had write the data dot correlation there is already function is there [01:14:49] okay data dot correlation and we need to annotate the true and we need to showcase [01:14:55] so here you can see here you can see okay here you can see there is a [01:15:02] in the x level there is a different feature is there the price and all the feature whatever [01:15:09] the numeric feature is there everything is there annotation is just like the uh it is showing so [01:15:15] that can be called as the annotation okay that coloring is the annotation so if you are writing [01:15:24] the false then simple okay so this is called as the one kind of annotation is there okay [01:15:31] so in the x level the similar feature is written on the y axis there is a similar feature is written [01:15:37] okay so some the correlation is always in between the minus one to one correlation is always comes [01:15:47] under the minus one say one suppose that if the one is there okay if your correlation score is [01:15:54] one that this is the highly correlated these two features are highly correlated highly correlated [01:16:00] if one thing is increasing the another thing is always increasing okay or then the minus one minus [01:16:09] one will tell if one thing is increasing the another thing is decreasing that means or if [01:16:16] the zero is there then there is a no linear relationship between these two features if [01:16:21] suppose there is a one feature there is a two feature if their correlation score is [01:16:27] okay there is a three option is there okay if there is a three option if there is a minus one [01:16:33] correlation okay yadi minus one correlation then a feature yadi positive ja ra hai dousra feature [01:16:39] will go into the negative direction if positive one correlation then if one is going in that [01:16:45] direction another is going in that direction if zero correlation then there is a no relationship [01:16:51] between this so if something some value is toward the one then it is the highly correlated if some [01:16:58] value is toward the minus one it is high least correlated and if it is toward the zero then [01:17:04] there is a no relationship is there so we had find out and we can find only the between the [01:17:11] correlation between the numerical data okay so here are the thing here are the so here you can see [01:17:18] the price car price relationship is always one that means you have similar kind of [01:17:24] feature relationship similar kind of features in the calling it's always the one so that means [01:17:29] every diagonal the diagonal value is one one one one one because that is the symbolic with symbolic [01:17:36] is one the price with price is one highway mileage is highway mileage is one while other [01:17:43] can be there so that means we have a fixed dependent variable that means price of price [01:17:49] relationship check price relationship highly correlated value can be comes under the independent [01:17:57] variable okay you can choose anything independent variable choose but if you are choosing the [01:18:04] right thing then the our model is performing good okay so you here you can see here you can see the [01:18:12] price okay price relationship check the highest value is the 87 0.87 okay that means which thing [01:18:21] that is the engine size so engine size is highly correlated feature with the price that means [01:18:28] so we can choose the engine size as a first independent variable [01:18:38] okay so to choose the independent variable we need to find out through the [01:18:45] sorry we need to find out through the correlation score okay so we need to find out the correlation [01:18:51] score and then we need to determine because we have only one choice that's why we are [01:18:55] chosen the engine size because the engine size is highly correlated with the price okay highly [01:19:01] correlated with the price so here you can see okay here you can see you can see this is the [01:19:07] final data that engine size is the highly correlation with the price so we need to [01:19:12] choose that this as a column so now i am showcasing that final data that means there is a two column [01:19:19] is there the one is the engine size and second one is the price okay so we need to uh abhi or b [01:19:26] there is a more technology are remaining but the time is not there so i need to stop here only to [01:19:32] understand that that we had understood the x and y hum x or y ko choose ka liya as well as we had [01:19:40] made the three things we have made the first thing we have made the linear line [01:19:46] beta 0 find out the equation as well as the linear line with the help of x and y so we [01:19:57] have determined the x and y right now okay so only one independent variable is 100 percent in the [01:20:04] linear regression only one independent variable is there while in the multiple linear there is a [01:20:09] more than one independent variable we can choose can you re-explain that why we are choosing yes i [01:20:14] am telling i am telling okay there are we need to make a correlation score with the help of the heat [01:20:22] map so our dependent variable is the fix that will be the price but is price ka kone se variable [01:20:29] ke saath highest relationship here you can see last column deklo ya yeh lavala column deklo ya [01:20:36] last row they flow here you can see price ka symbolic say is minus 0.082 with the wheel [01:20:43] waste 0.58 with the length 0.69 with the width 0.75 but with the engine size you will get the 0.87 [01:20:51] so 0.87 is the highest value that's why we are chosen the engine size as a independent variable [01:20:58] okay sir you can explain heat map heat map is just like the relationship between the features [01:21:08] which relationship develop there is a one diagrammatic way is there and that can be the heat [01:21:17] map and heat map can be designed with the help of the correlation score okay correlation score [01:21:22] के लिए we are having the formula कि यदि हम दो numeric column को यदि check करना है [01:21:28] so we can make the correlation score and correlation score find out करके यहां पर लिखा हुआ है [01:21:32] okay and how we can make so there is this is the sns.heatmap and data.correlation directly [01:21:40] correlation or bracket that means हमारा बन के आगया okay sir is it possible that [01:21:48] with the given value of y can we predict the x since uh no no we cannot x ready um predict [01:21:56] if we are predicting the y through the x we need to predict the y using the x okay because [01:22:05] dependent if we are converting the dependent variable as a y and independent as a x then we [01:22:11] can do sir this it may be designed based on the previous given here 100 previous data set here [01:22:17] you can see the complete value is there here the price is there here the thing is there so we had [01:22:24] based on the data set so sir will it be accurate based on the correlation matrix many feature are [01:22:29] available for example which are the also good matrix so linear regression yes 100 percent if [01:22:35] you are choosing the correct independent and correct dependent variable then 100 percent this [01:22:40] will give the good result okay but which highest correlation score is there you need to [01:22:47] choose that particular could please share machine learning syllabus at the end of this class [01:22:53] actually the sir will tell you about the syllabus okay the sir will tell about the syllabus because [01:23:00] that is your wednesday class sorry not the wednesday whatever the class is there one more [01:23:06] classes is there now where you can see that particular so calculating beta 0 beta 1 for [01:23:11] every feature is actually find the correlation no no no no again you are not confusing correlation [01:23:17] score is only find the correlation score is only used for finding the independent variable [01:23:25] the beta 0 and beta 1 is for the linear regression right now needing you need not to confuse [01:23:32] okay the we need to find out the x okay hume x ko choose karna hai find nahi karna x ko choose [01:23:39] karna hai data upset mein se so that's why we are finding the correlation okay y ko predict karna [01:23:46] and y and x to predict for the first input data. Then only we need to go ahead. So beta [01:23:54] 0 and beta 1 can be useful for making the best suitable line. So for that for beta 0 [01:24:03] and beta 1 we need to first choose the x and y. So we have chosen the x and y. In the [01:24:09] next class you need to remember. What should I remember? I will not explain again. That [01:24:15] we had decided the x as a engine size okay engine size should be the x while y will be [01:24:23] the kya hai humara price and in dono yeh dono given hai this two are the given okay [01:24:30] we need to determine the vita 0 vita 1 okay so that this is the line okay this is the [01:24:39] line that we need to make this is the model okay so yeh humara x or y x or y given hey us case [01:24:47] we need to determine the beta 0 and beta 1 then we need to train the model once the model is [01:24:53] trained we need to extract the model okay after extracting the model we need to put the new x [01:25:00] value okay so that we can predict the y okay so this things you need to keep remember so that's [01:25:08] it from my side okay that's it from my side we'll see that but next next time we will see the linear [01:25:15] regression coming only right now you need to understand this thing okay okay so that we can [01:25:24] able to get the linear regression okay so thank you so much thank you so much for connecting [01:25:30] we will do the the that particular things okay how do we choose what are the x feature good [01:25:37] through the correlation through the heat map that how we can determine the x okay how we can [01:25:46] determine that this x will be the good for the y through the heat map just keep correlation score [01:25:51] is the highest one we need to choose okay huh everything i'll provide okay but i provide can [01:26:00] you explain the program once again which you are showing abhi in the next class i'll tell [01:26:06] in the next class i'll tell already the time is up okay so i need to stop sharing okay i need to [01:26:17] stop sharing you will get the assignment very soon okay okay so thank you so much we'll see [01:26:25] that particular things in the next class also only you need to keep remember then only you [01:26:32] need to understand okay yeah yes you can choose any other also but the engine is engine size the [01:26:43] most prominent independent variable you can choose anything but that will affect your result [01:26:48] you can choose anything but the engine size is the most important thing the tom missile is the [01:26:55] book okay tom missile tom missile is the book that is the good book okay okay so thank you so much [01:27:05] thank you so much we'll see that particular things in the next class also so i'm stop recording okay [01:27:10] and we'll meet in the next class okay thank you so much thank you so much