# Advance Machine Learning

- **Course:** 6103 - Advanced ML
- **Recorded:** 2026-09-19 09:25
- **Transcript:** 581 segments, 10232 words
- **Made by:** deepdml/faster-whisper-large-v3-turbo-ct2

---
Okay. So good morning. Yeah. So there are, yeah, participant is there. So we'll just wait for two to three minutes. Let everybody have to join. Then we'll start the session. Okay. Good morning. Good morning. Okay. I need to check with the Moodle person. Then I'll tell. Okay. Okay. I'll ask. Okay. I had not uploaded the last class. 100%. I had not uploaded because in today's class, that will be the that particular things are completed in this particular live then only i can upload because half of the ipynv file is left okay half of the ipynv file is left okay so i'll tell that particular things in today's class then only we can go ahead and we can upload the thing okay i understand i understand the transcript are very much helpful so i'll tell with the i'll ask with the noodle person and i'll rectify this okay assignment so already the assignment number one is on the moodle okay already the assignment number one

is on the noodle okay total is just like this particular thing where you get this particular class this is this is your thing okay here you got the assignment okay here you got the assignment oh sorry i i my screen is not shared okay so moodle is just like this particular website okay this particular website okay i think i think i think that particular things i don't know so just check with your person because that is from our side okay that is from our side okay no issue the if assignment is coming then you can do that particular assignment i'll start my teaching from now on okay yes all the assignment will be visible from 22 okay so from our side the assignment is completed but from your side it is visible to from it is visible from actually i don't know about the syllabus of assessment one the joby tomorrow bed nashday class that means i think tuesday or wednesday whatever the class is there in that particular

class you can ask okay just tuesday tuesday classman sir will tell about this particular thing okay so yes so in the last class in the la so i i'll start actually i i don't know about much about the assignment at all i'll start the class okay so in the last class we had seen about the linear regression so linear regression we had created the three things that the first is the linear model okay linear line that is a y is equal to mx plus c or the beta zero plus beta one into x so this we had created after that there is the intercept is there so we need to define the intercept that is x y and b1 okay so this is the that particular things after that we are having the slope okay so slope slope how we can find out the slope so formula is this okay so this is the slope that xi minus x bar yi minus yy and divided by xi minus x bar is square okay and we need this this is how we are getting the vita1 once we are getting this vita1 we can put here okay now we

can get the vita0 now vita1 and vita0 we can get and we can put over there so that we can get the new value and how we can get the beta 1 and beta 0 with the given x and y because this is the supervised domain now there are we had loaded the data set already i had told this particular thing that's why i'm going in very very fast manner we had seen this complete data now we had chosen the price price data as a price data as a dependent variable okay now we need to choose the most prominent or most correlated independent variable okay so already a dependent variable choose that will be the price now the most relevant or the correlated independent variable we need to choose and we need to choose with the help of the correlation so jiska bhi correlation price highest that will be the most correlated feature so here you can see here you can see this is the price and there are the complete thing is there complete correlation score is there so what is

this one this this this now you will get the engine size is the highest sir please can you tell me where we can see the implementation of in practical scenario uh practically everywhere where you can do the stock market price you need to become make a one project just like you need to predict something or predict the continuous value everywhere you can use the linear regression okay everywhere you can use the linear regression so in the linear regression there will be the restriction cable we can use the single independent variable and single dependent okay so we had fixed problem definition case of say that price will be the independent sorry price will be the dependent variable now there is a second variable that we need to choose okay and that will be the uh engine size okay how we can decide the engine size okay how we can decide the engine size engine size will be decided like this the 0.87 okay so this is these things we need to

choose now we had chosen the independent variable and the dependent variables now what is the final data final data means we are having the one independent variable now the independent variable will be the engine size now the dependent variable will be the price now the target target is called as the dependent variable okay we are given so from the data the price will be going in the target okay while the engine size will be treated as a predictor okay this is the variable okay yes this notes is not available i know because that complete ip ipv file is not completed yet okay after this particular class i can only upload that particular thing okay so i know that particular thing so we had fixed the two things the one is dependent and one is independent okay why the engine size yes i had told i had already told in the last class because this all the price is the dependent variable and that is the fixed thing okay price will be the dependent

variable and that is the fixed thing but we need to choose the independent variable from this all remaining feature sare remaining feature may say you can choose anyone but kisko choose karna what is the recommendation thing job he price highly correlated hooga so we need to find out the correlation correlation kia batata hai kitna aapas mein correlated how the two feature will be the correlated one the correlation ke liye we need to find out the correlation okay and how we can get the correlation so this is the price and this is that all are this so 0.87 is the highest value okay so engine size is highly correlated with the price that means how the price is affected the so how the price is affected highly with the engine size that's why we have chosen the independent variable as an engine size so essentially we need to find the highest yes hundred percent highly correlated feature because in the simple linear regression in the simple linear

regression we are having the restriction we can choose only the single independent variable and the single dependent variable okay so that is there now we are fixed and we are finalized this particular thing now we can so this the price versus the engine size we need to showcase the figure okay we need to showcase the figure so the figure is looking like this key on the x-axis there is a engine size is there and there is a y-axis price is there now this is the complete data point now we need to make uh is the previous session notebook and document are not uploaded post python i'll upload all the notes right now okay after this particular class i'll upload the complete live assignment in the left part okay in the left part i'll upload okay i had already uploaded the python notes final b2 okay python notes final week to having the complete things okay jitna that is the 88 page file is there okay it is having all this thing uh you can see the support

of the multi how we can decide which library we can use if we are it is not there it is already there you had made sent the screenshot the code is a one code is a one folder is kinder python notes final version two dot docs that is there it is already there the someone had sent the screenshot someone sends the screenshot it is there the jupiter notebook is not there so peter notebook is not there actually why the zupiter notebook is not there all the code i had copy paste from there so you can prepare that particular thing okay you can make i don't have the ipynv file okay so the heat map value are the very even if multiple users are using the same data set yes hundred percent it is correct actually actually the thing is that the multiple people are asking the multiple things so i need to first sorry sorry for this i need to tell first i need to complete my lecture then only i can give this such kind of the question

because that that will complete mess this particular things i am not able to teach like this okay so the thing is that why you are worrying about the notes and all i'll i'll upload all the things first i need to complete the what you want to do you need to learn that particular thing okay i want to say one clear thing about this that i had uploaded the complete 88 page file that has a python notes okay version 2 name okay you need to copy paste each and every code in the ipynv and you can run i had not i'll not upload the ipynv file over there okay so this is there now i'll we focus on the linear regression whatever doubt related to the linear regression you need to ask that particular things okay if i am giving such kind of the scenario that will be the price and that is the fixed thing now how we can decide the other independent variable because we are having the so much option about the independent variable so whichever the

highest correlated feature is there we need to choose that okay so price highly correlated that will be the engine size that's why we are choosing the engine size as a independent variable okay now we are fixed predictor ke under we will put the independent variable and target ke under we had fixed the dependent variable now we are fixed the final data inside this okay now there is this particular thing there is a price and there is a engine size is there so now we had seen this particular data distribution okay now we had fixed this data distribution okay so now now what is the objective of the what is the objective of this linearization so we need to make a linear line that will be the best fit line while seeing this all data distribution so data distribution we need to design the linear line okay we need to make a linear line but it is not possible it is not possible to design the linear line that will satisfy

all data point so this one best fit line that means we need to find out the good slow as well as the good intercept that will make the best fit line okay that will make the best fit line so this is the data distribution you need to see okay now our main thing comes okay now our main thing comes we focus on this particular thing already inside the predictor engine size is there inside the target what is there the price is there now we need to find out the slope okay now we need to find out the slope so slope already definition is there okay already we had fixed it in the last class here this is the complete definition about the slope so slope required the x and y now we had decided the x as a engine size and y as a price okay now we are fixed that particular things and in the x and y we need to put so we are using this particular function okay just like this we are calling here so we are calling the slope and we are using the

predictor as well as the target okay now we are writing the v1 okay so now from this from this particular function we'll get the v1 okay and how we will get the v1 already we can have seen the formula of the slope okay similarly similarly we are getting the intercept for intercept what things are required we are requiring the predictor we are requiring the target and we are also requiring the b1 because we are also requiring the slope for finding the intercept okay so this slope or intercept function is common yes hundred percent because this is the mathematics okay it is very much common for all the problem okay because this is the mathematical thing slope or intercept formula is every time same kya change hoga only we need to change the predictor and the target or only we can change the independent variable and the dependent variable that's it okay now there is a predicted okay now there is a predicted what things there is

again the linear thing is there okay linear function is there in the linear function what the three things are there we need to give the predictor we need to give the b0 and we are we need to give the b1 and this is how we need to get the predicted value okay this is how we need to get the predicted value okay so this is how we got the v1 this is how we got the v0 this is how we got the predicted so this is our prediction okay this is our prediction so now we need to plot this predicted line okay we need to plot this predicted line so what is this in the last figure you had seen the data distribution now our task is to make the predicted line but that line should be the linear line because we have linear regression the restriction is there so that we can make the linear line okay so here we are we need to make the scatter plot scatter plot predictor versus predicted and then we need to make a title the next level by level

now scatter plot just like the printer as well as the target okay target okay which but the line plot line okay so what is inside the predictor and this is how we can fix this particular line so this is how we can fix this particular line keep we are having the engine size we are having the price okay then yes our data distribution are having in the blue dots okay this all are in the blue dot now we had made the best fit line that can cover each and every point process it will cover all the data point but this is the best fit line we can say according to the data distribution okay according to the data distribution this particular are the best fit line and how we can ensure this will be the fixed line because the training is already happened and we had fixed the r m as well as the c either we can call the m as well c either we can say the beta 0 and the beta 1 okay in the novo we can say like this okay now we need to decide so this is

the complete line okay this is the complete line oh now if the new x comes new x comes means new engine size comes okay suppose that the new engine size is like 400 okay here the 50 100 150 200 250 300 then here the 400 makeup okay so on the 400 whatever the point on that particular line what is whatever the price point on that particular line that can be called as the predicted value so for every x we are having the predicted value okay we are having the predicted value okay so this is the things and this is the understanding about the linear regression okay so what is the most important thing in the linear regression we need to fix the first thing is that we need to fix the independent independent variable according to independent and dependent variable we need to make a linear line okay and according to that linear line we can say that linear line should be the best fit line okay that should be the best fit line okay sir we have said like if training is

not accurate then we need to change this coefficient to reduce total error so which parameter we can change yeah so according so this is the very good question so if our training is not good we can say okay it might be possible so what parameter we can change according to the data distribution right now right now in this particular in this particular algorithm there is no hyper parameter tuning is there because this is very first machine learning library sorry this is very first machine learning algorithm so we need not to change that particular things because that particular condition are the very fixed thing but just like we are having the hyper parameter tuning kind of concept is there that can be similarly called as the fine tuning so fine tuning whatever the parameter are having inside the model.fit model.fit is a one method that are required to fit that that particular model okay us can't the job you change so here we need to make the m or

see that means the parameter is the coefficient is the b0 or b1 or aim or see the slope or intercept we can change this for your change we can fine-tune the data set हमें data set को correct करना पड़ेगा, then only we can say कि हमारा link or regression अच्छा बच करेगा. So now we need to print the B0 as well as the B1 because we are fixed thing. So हमारा B0 will be this is the slope or this is sorry this is the intercept and B1 is the slope. So we can write this particular thing. So now the red line above is called as the predicted value. So this is the line that can best fit the data. because training ke baad training ke baad ye best fit line draw hoi hai okay so now our linear regression prediction is done in the next thing and we are going to be do the evaluated okay so we need to do that particular thing okay so this is how we need to do now if we need to evaluate the thing okay if we need to evaluate the thing then what things we need to think

okay don't worry don't worry don't worry okay don't discuss this all things over there chat okay i'll give each and every answer but the thing is that first thing is that we need to understand the lecture because i'll upload the lecture after one day or after the two day 100 percent you will get everything don't be do that particular things okay okay so the lecture thing is very much important because we are having only the one hour 20 minute effectively okay so we need to think about that you can get the more information from there i need that particular thing so don't we take personally don't take anything personally okay it is the very simple thing i'll upload each assignment ppt note everything you will get okay i understand the for that particular thing your marks is also carrying that particular thing so i understand your situation okay but we have a time at last 10 minutes we will take all such kind of the queue

okay yeah so again one more question related to the that so that evolution decide accuracy by feeding the year but we are not saying the accuracy because in the regression the accuracy is not worked in the classification accuracy will work okay i'll tell will the v0 and v1 always change when we return rerun the model no v0 and v1 are not changing until and unless we are not changing the data set okay if you can change the data set then v0 and v1 is changing because it is the perfect mathematics okay it is the perfect mathematics is if all the data points are same then how we can say the v0 and v1 is changing okay model run hoga rerun hoga if same data q plus then it will not change because it's a mathematical thing okay it's a mathematical so now what happened in the evolution in the evolution uh so how the training is happening isn't the data just yes it is only the one iteration it is only the one iteration it's

just like a simple example okay it's just like a simple example that's why it is the single iteration in the next iteration 100 beta 0 and beta 1 is updated in the next iteration beta 0 and v1 again beta 1 again it generate okay so it is there but mathematically we can run the things only once but in the machine learning we will run the things into the more iteration but we are only need to understand these particular things in the single one right now we are doing or we are restricting these particular things as a single one okay now we are moving ahead and we need to see the evolution the evolution ka matlab kya hai we are having some actual value okay we are having the some actual value and we are also having the predicted value right now okay now if our problem is the uh is the regression yadi humari problem regression okay if our problem is the regression then we are using the r square okay we are using the r square so r square is there

okay so now r-square is basically the statistical measure that how close the data is fitted the regression line r-square kya batata hai ki jho humare data points se kitnye achse se fit huye us particular line okay so it means our independent variable data the engine data so engine data or price kebis kitnye achse se model humara fit hua hai so we need to test okay we need to evaluate so for evaluation we are having the r square for this so if suppose that your problem is the regression problem then you need to decide the r square okay so you need to decide the r square and what is the r square r square is the ss regression dependent of sorry divided by the ss total or r square we can say 1 minus ss error divided by the ss total okay so now we need to understand where the ss regression so ss regression means regression sum of square that can quantify how far the predicted value from the mean that means that will be

decided by the ss regression while ss error what do you mean by the ss error error sum of square means it can quantify the variance of the target data point around the regression line So on the regression line target point variance is the SS error while the SS total is the total sum of square that can quantify the variance of the target data point around the mean. So there is the three differences there and the three kind of error is there that can be there. Now from the formula you can little bit understand. What is the SS regression? SS regression is the yi that will be the predicted point. Okay, this is the predicted point minus the mean. Okay, whatever our target was, SSR is the same as the residual. Yes, 100%. SSR is the same as the residual. Okay, here you can see. From the formula, you will clearly get the understanding. The YI is the predicted minus the Y bar will be the target. Whatever the dependent variable is, it will be the mean.

And we are doing the squared. Okay, we are doing the squared. to remove the negative effect because sometimes the mean should be the high or sometimes the predicted value will be the high okay so this is there now ss error ss error means yi minus y predicted that means the actual value minus the predicted value this is called as an error and the third one is the ss total that yi that is the actual data point minus the mean and we are doing the square so we got the ss regression ss error and ss total now in this we need to implement this okay we need to implement so what is the r square r square is the yeah so actually need to need the error so that we can make the changes in the equation then yes 100 percent you are correct we can change it for the second iteration second iteration we have the question for change that means that means but right now we have fixed the thing okay now you need to understand we need to find out the r square and r square is the what is the

r square for r square we need the y or y head okay y head is just like predicted value and this is the actual value now we have a actual value now we have a predicted value now we need to determine the ssr that is the first one this is the ssr this is the sse and this is the r square we need to find out okay or we need to find out and we are fix this particular things now for that we are requiring the y underscore this is the mean of y okay now we need to find out the sse okay sse C के लिए formula क्या है that will be the y minus y hat okay and we are doing the square so this is the formula and the sum is the total value that y and y hat in the zip that is the complete thing is there okay इसमें से we need to call the single single value the zip means the complete package of y as well as the y hat जो भी y के associated y hat आया है that will be the complete package in the zip or usko hum y comma y head me restore okay so this

is called as the sse okay this is called as the sse now there is a sht that means sum of square total so this is how we need to find out that is the y minus y bar okay y underscore so that is the mean and we need to showcase the y required so this is how we are doing now what is the r square r square is the 1 minus ss error divided by ss total so this is there r square is 1 minus ssc divided by the ss total so this is how we are returning the r square this all things are already inside the cyclic but i'll tell the mathematics first this is the mathematics regarding this now r squared and we need to give the target value as well as the predicted value now we are getting the 76 percent okay we are giving getting the 76 percent now 76 percent what is the thing jitna acha jitna acha r-square hooga utna hi humara predicted model acha sorry our model will be the accurate one ki yadhi humara one hooga to one ka meaning kya

hai what is the meaning of one one ka meaning ye hai you need to understand yeh humare data point hey okay and our line is going in that particular direction joki cover kareh sareh data point ko okay sorry data point ko cover kareh okay sorry data point ko cover kareh and that particular point is called as the this particular point is called as the r square as a one okay that means the hundred percent okay but if this all are the data point So that particular things are the 0.75 or whatever I didn't get the initialization of SSE and yes, that is the 0 into 3, 0 into 3 that means that we have 3 value create. Okay, 0 into 3 is this is the predefined thing. that particular thing just like here okay here we are given this three thing okay so we store zero is an axis and here we fix okay now zero points and yes that is a 75 points are covered yes that is the correct thing 75 percent point cover and there will be little bit error is

there okay so this is there 76 percent is not the bed for the linear regression okay now this is the complete thing about the mathematics okay i had told in the 1.5 class last class and this half class okay this complete things are called as the linear regression so what is the linear regression i'll tell just in the five minute fast minute i'll grip all the things okay i'll brief all the things i'll tell all the code in the fast manner okay so we'll start just maybe abhi i'll again tell in just five minutes that will be the quick summary okay so what is the linear regression so linear i need the same as the yes it is the least square method it is very much it is the least square method only least square method is the thing that are required for the best fit line okay ah okay so anybody having any doubt otherwise i'll again start that particular thing in just i'll give the quick summary okay i'll give the quick summary so now now we are

having the complete data set in that complete data set we need to choose the independent variable and dependent variable now we need to draw one diagram or you need to make one data distribution between the day the uh the independent variable and the dependent variable now we are getting some of the data point over there okay in sorry data points go choose we need to make a one linear line okay that will be best fit that all data point and that particular line is called as the regression line so how we can design this linear line so we need to make the linear line with the help of the y is equal to mx plus c or we can say y is equal to beta 0 plus beta 1 into x now we have a supervised learning that means first training will be happened with the help of given x and y so given or xy case upset we need to train and we need to get the beta 0 as well as the beta 1 now what is the beta 0 beta 0 is just like intercept and the beta 1 is called as the

slope so we need to determine while x is called as the independent and y is called as the dependent now we had made the complete things okay we need to make this particular line for making this particular line we are requiring the beta 0 beta 1 okay so beta 0 and beta 1 we can get from the given data x and y okay and that is called as the training game training karka beta 0 base suitable beta 0 beta 1 find out current okay then only we can make the best fit line now beta 0 is called as the y bar minus the beta 1 into x so for this is the perfect formula for the intercept and in this particular manner beta 1 is called as the beta 1 is called as the slope so first we need to identify the slope so this is the xi minus x bar yi minus y bar and we need to divide the xi minus x bar square so this is how we got the beta one through with the help of x and y because we know the x and y and accordingly we need to get the beta one now we are putting this beta one over

this particular intercept formula and this is how we got the beta zero now we got the beta zero and now we got the beta one now we can put that two things with the help of x new x new x coming in kya hai ab beta 1 or beta 0 ke saab se we had made the line ab if the suppose that the new data comes or new independent variable comes so we can get or predict the y over there so we can put the beta 0 and beta 1 over there so this is the perfect thing about the linear regression now we had given the one data set that will be the automobile data dot csv and our problem definition is that we need to predict the price of the car so car ka price prediction now the car price is called as the price of the car is the dependent variable while we need to choose the independent variable so how we can choose the independent variable so for that there is the one method is there that will be the heat map or the correlation is true so a price to fix okay

dependent variable now we need to choose the independent variable from remaining all the features so out of this those are highly correlated with the price we can choose that particular thing so engine size we can choose and this engine size is 0.87 okay so we had chosen the independent variable as the engine size while dependent variable is the price now we can put these things in the formula so that engine size or price case after we had identified the beta 0 as well as the beta 1 now beta 0 beta 1k subset we had made this particular line so this particular line is called as the independent uh sorry this particular line is called as the predicted line all the regression line now we had made this particular now we can check that is good or not so for that there will be the evolution parameter is there and for this the evolution parameter is the r square and what is the r square r square means the one minus ss error divided by the ss

total and what is this thing so the y predicted minus the y bar is the regression y i minus y ahead that will be the error and sh total is y i minus the y bar so this is the ss total so now how we can get the r square r square we are getting from the one minus sorry there is a formula one minus ss error divided by the ss total now we are making this particular formula in the python okay and this is how we are given the targeted value with the predicted value because the actual minus the predicted currently now we got the 76 percent so 76 percent we are getting the r square but what is the uh ideal situation ideal situation is that the r square should be the one okay so this is all the things related to the linear regression now i'll take the question so sir what can we get this csv file here in the chat so that we can yes i will give this csv file okay now depending on the strength of the relationship of the two features we

picked yes with the strength and the relationship of the two features and this is the definition of the correlation that correlation is always giving the relationship and the strength of the two features so that's why we are choosing this so that we get the engine size or price okay now you're the multiple linear regression of the independent variable x jada use kar sakte waha parap engine size ke saath dousra feature we use kar sakte ho okay so how to create the heat map heat map banane ke liye heat map this is the heat map this is the heat map heat map banane ke liye already there is a c1 library is there so c1 that is dot heat map or we can say data dot correlation and this is how we can get we can design only we need to make this particular code and we can design the heat map okay this is how we can make the heat map or heat map numerical data correlation is always one okay but other feature the correlation can be different different okay so this is called as the

now whatever things I had told I hope this particular things are clear so then for the multiple regression for another V2 will be created yes hundred percent and other V2 is created but we cannot do that from the scratch because scratch is a little bit difficult okay that's why I told that complete things with the help of scratch Okay, but now now I want to tell something Last class and this particular that means complete 2.5 Now we can do this complete task in just 5 minutes Okay, we can do this complete task just in the 5 minutes because Python is very rich library Don't we go in the panic mode only that's it only this five to six line will cover all this previous thing okay because inside the scikit learn there is a clear library is there that will be the linear regression okay we can call so how we can decide that the use case if is too simple linear regression actually if we need to choose the single independent variable then we can choose the linear regression otherwise we need

to go ahead with the multiple linear regression it is just your choice all always the multiple linear will give the good number okay multiple linear regression 100 percent in every situation okay but if you are the eight heat independent variable then we can choose the linear regression does the correlation heat map change if we can train the data multiple no no no it is irrespective of the heat map definition training heat map is only the data pre-processing kind of thing during the data pre-processing we need to decide okay we need to decide okay so that is all does it remain same for all iteration yes it is remain same for all this so is it possible that if we run the model give not good result with the test data but second best correlation feature will give the better result with the test data uh yes it might be possible it's it is my way might be possible okay because the machine learning is uh not following any thumb rule machine learning

me this will give the correct thing this will give the incorrect thing only through the trial and error method okay through the trial and error method um trial and error method we can decide okay trial and error method so it is there so it is like this okay but it is the recommended thing according to the theory which correlation highest is 99.99 percent time okay it is there it is the fixed thing okay it is not the hundred percent fixed thing but it's the 99.99 percent it is the fixed thing okay yeah so now i'll tell the linear regression with the help of scikit-learn okay with the scikit-learn because scikit-learn is one library so from sklearn dot linear model we need to import the linear regression so jitna bhi humne mathematics sum just slope intercept all the things only jab hum linear regression ko import karlayenge we can directly find out this particular thing sklearni dot linear model candle the linear

regression is already there okay so is single single line say we can call the linear regression we all can put that particular things over there okay now we need to learn the from sklearni dot matrix and we can call the mean squared error okay mean squared error is again one kind of the evolution matrix r square mean squared error mean squared error what is the mean squared error that will be the actual minus the predicted and we are doing the squared and that particular things are called as the mean squared error so this is also one kind of evolution matrix is there okay now after that we need to make the reg that will be the variable is is के अंदर we are calling the linear regression okay linear regression कर दिया now we need to fix the predictor predictor को fix कर दिया कि predictor के अंदर डाल दिया np.array so np.array बना दिया और predictor बना दिया उसको reset कर दिया minus 1 to 1 it is not the big thing okay it is not the big thing we are fixing the predictor okay we are

fixing the predictor now we need to use the fit method because fit method is always used to training okay use for the training now we are having the model over this two data set there is a predictor is the independent variable and target is dependent variable now we need to fit that so this is how our training will happen okay this particular set training okay this particular fit method is always used for the training while predict method is always used for the evolution okay there is one question to determine the waste interceptor slope coefficient we iteratively run the elbow on the data but we have to find formula to find out here which is the fix and how this weight will change during the training in this particular manner only this particular thing there is a this this this this this there are lots of data is there okay lots of data So in the first iteration it has run. In the second iteration it has run.

So in this case something MOC has come. Now this case MOC has come. Now this case MOC has come. Now this case MOC has come. Now this case MOC has come. Now this case MOC has come. Like this. This is there. This is the thing. Why we are doing the reset. Resetting is just like so that we can be able to perform the mathematical operation. mathematical operation perform कर सके इसलिए हमने उसको रिशेट कर दिया प्रिक्टर इन फिता अल्रेड इपाइड या संट्रेट पर्सेंट अल्रेडी इपाइड मेफटर इस यूजड फॉर्ट ट्रेनिंग तो इस इस ट्रेनिंग अधिस प्रेडिक्ट मेफटर इस उस्ट पॉर्ट टेस्टिंग प what is the initial value of the predictor initial value of the predictor predictor canada to Sarah Pura engine size okay all are comes here okay and target target price so engine size or price the data going in the direction okay so this is how starting this particular value at the starting time this is the predictor and this is the target this complete having the training okay this complete is having the training

okay now we are having the predictor now we get the vibrant now we get the predicted value over there okay now we got the predicted value now there is a r square is there okay now there is a r square is there and we need to get the score okay there is already the score is already mentioned and we need to find out the predictor and target we need not to write the formula also because inside the reg inside the linear regression inside the library already the score function is there that will tell the r square okay now we need to print the r square so through the through this also through the model through this particular library also we got the 76 percent the same r square we are putting the predictor is passed both for the training and testing right now right now we done this particular things but this is not like this uh machine learning machine learning we are having the complete data okay we are having

the complete data so we are divided this particular data into the x train or y train okay and x test or y test it's meant test train split normally normally what we are doing this is the very first thing that's why i am not splitting the things but normally 70 percent of your data is cut down into the x train and y train similarly 30 percent of data is in the x test and y test so model ko ham train karte hai okay we need to train and we need to test on this particular data system okay but right now so this is the predictor and this is the target that we are doing in the normal basis okay normally we are doing this so here we are we had not splitted the data only for understanding because this is the very first this particular data training perform and here per poor effect sorry this is also the training data for this okay is he for training currently now is equipped test okay so we are getting this but this is not the right option right option is

this one okay right option is this one so if one experiment has the multiple data point of two parameter should be considered data from the many experiment i have such cases I don't understand if one experiment has the multiple data point of two parameters should be considered 100% the many experiment you need to perform the many experiment because like fixed line or the best fit line are coming after considering all the data point sorry data point consider okay sorry data point for consider then only we can make this particular thing okay we can make this particular thing i hope so the things are little bit clear but here the clear i'll tell just wait i need to stop sharing i'll showcase you one simple example i need to so that you can understand just wait we are just wait just wait okay so i need to re-share it okay yes i need to re-share it and i'll tell one thing to you okay suppose that uh yes so yes there is a one numerical is there

from here you can understand this particular thing okay suppose that suppose that this is there okay suppose that for better understanding for better understanding suppose that this is the complete thing okay this is the independent variable and this is the dependent variable okay this is the independent variable and this is the dependent variable now two associated with four three associated with five five is associated with seven seven is associated with this so we need to apply the linear regression okay so how we can apply the linear regression so price of the t-shirt that will be the independent sorry this will be the dependent feature okay yeah my dependent feature over here yeah my independence feature okay now we need to say the y is equal to mx plus c banana okay so we are having the data point my data point a two or four three or five this is the data point so humare past x a or why according to this x and why we need to determine the

M or C or M or C kya find out kate M and C there is a clear formula formula kya hai yahaan per you can see this is the formula I had already told so is X Y minus X bar Y minus Y bar X minus X bar this is we need to determine the aim as well as C here's determine because so we have determined the aim as well as the C to our aim Kaya aim will be the 1.518 okay and C Kaya 0.305 so yeah 1.518 now what is our equation Y is equal to 1.518 x plus 0.305 so this is our y value okay this is our y value now whenever the new value comes okay now whenever the new value comes suppose that this x comes kia x humara 8 so 8 humara hai to kya result a sakta so our point is suppose that this is 8 now we will get the 12.45 so So, this is the thing that we can do this is how we can do the prediction now suppose that this is the training data okay this is the training data so 2 x 4 x 3 5 now if what is our value that is a 1.518 x plus 0.305 this equation now if we can put if we can put

the two over there you have to do our actual actual result will be the fourth but what is the predicted the predicted result is the three point three now this is our error that is the four minus zero point three so this is the zero point six seven will be the error now if the three value is there our actual value with data point will be the five but our model can predict that g4.9 so this is the error now what is this is five this is there now this is 7.9 and this is the 0.89 now there is 7 now the value is 10 now this is particular value now this is 9 this is 15 our value is going like this so this is the complete this example okay there are one more example is there that will be the x value so this is the independent one and this is the dependent one okay so this is the independent and this is the dependent so we are using the formula there is a two formula for finding the slope okay we have two formulae here you can see this is the first formula and this is the second formula

you can choose anything but we are choosing this okay now we are choosing this is also the true okay both the formula are true so we will solve one numerical from this now here you can see this is the complete thing okay this is the complete thing is there okay so here is there now this is the x and this is the y so this is how we are finding the x y this is how we are finding the s is x square now we can put each and everything over there that is the a 5 into 88 this is how so this is how we got the m okay now this is how we got the this now we got the equation that is the 13 by 10 ax plus 5.5 divided by 5 so this is called as the this complete things are called as the this thing okay so yes i will upload this particular ppt also okay so this is how we got the value okay this is how this particular value is here okay so this is the equation okay so whenever the new x comes then y is equal to 13 by 10 and

suppose that new value are coming as a 10 then 5.5 divided by 5 so here you can see 13.5.5 by divided by 5 so this is just like a 1.2 so the answer will be the 14.2 okay so this is the complete thing about the linear regression so linear regression are doing that particular task also okay so this is called as the linear regression okay this is called as the linear regression okay so anybody having any doubt then i'll take the question i'll take the question because that's it from my side i need to tell that particular thing so in the next lecture okay in the sub there is one more thing is there suppose that suppose that i'll share this particular thing suppose that your data point i like this okay your data point i like this ki humara data point linear manner it is in the nonlinear manner okay suppose that this is not in the linear manner nonlinear manner simple linear regression will not perform in the good manner then we are using

the polynomial model that will cover all the data point so now the curve is there okay now the curve is there so the formula for this is the beta 0 beta 1 into x1 and beta 2 into x is square okay so this is the updated formula for the polynomial okay this is the updated formula for the polynomial so this is how we need to go ahead and we need to see the polynomial regression okay this is how we can see the polynomial regression so this is the formula for the polynomial regression so in the polynomial regression so this is the formula for the simple linear regression okay where the beta 0 and beta 1 because we are having the single independent single dependent but in the multiple linear regression what happened we are having the multiple independent this is the first independent this is the second independent third independent like this many independent is there so this is the multiple linear independent while the polynomial

regression is having the single independent variable but only the polynomial that will be the square that will be the cube like this we need to solve okay so we can perform the code from the scratch scratch but we cannot make this and this because when this is very much difficult thing if we are drawing so in the sk learn in the sk learn there is already the function is there for the multiple linear regression as well as the polynomial so you can do that but sir can it be the combination of multiple curve like multiple polynomial curve yeah it is there it is possible jesa bhi humara data set ho ga uske according hume apne model ko change karna padega because data is a fixed thing hum data ko change nahi ka sakte hum kebal model ko change ka sakte okay that is the only thing that we need to understand okay so this is all about the linear regression polynomial regression and the multiple linear regression okay so that we

had already tell about the uh that all things over there now you can ask anything in the previous code where target is coming target to fix according to the problem definition now price is the fixed thing okay we had declared the predictor but we had not we had declared the target also okay we had already declared we had already declared the target don't be confused we had already declared the target okay this is the target this is the fixed thing here you can see here you can see this particular thing this particular you can see we had fixed the target target we fixed here okay in training process m and c are the variable which are adjusted depending on the error we can we get if we can fix the m and c then how we can adjust the m and c to reduce the error we are not here to reduce the error हम एक बाद data set के हिसाब से moc निकाल लेंगे we can do that particular thing हमें यहां hyper parameter tuning we cannot change the m and c

Amo C ko barwa change naii ka sakti becawz the until and unless we can not change the data set amo c hemara fix a data set ke baad ok and that is the fixed thing haa multiple kub ka sakti yadi hum single single values ko lye raha haiyaan pa I had already informed ok yadi humne isse koya nikaala mo c but we cannot do in the multiple iteration okay I want to tell that that particular thing okay that is the different story okay so now tell me anybody having any doubt now you can ask the different assignment related question also but i'll tell one thing to you that the assignment and all the things that means the first assignment is already completed second assignment will be started from the 22 okay or yadi or bhi clarification karna hai assignment related to tuesday ki class mein you need to ask with the sir because i am also not responsible and i am not very much close with this particular subject because whatever the sir told i informed to you okay so tuesday class me you can ask such

kind of question related to the assignment and all kind of theory okay so that is my suggestion for the uploading i will upload that particular thing so i had already upload uh i actually i don't know the first assignment is completed or not i need to check i need to check it is there or not if it is there then you can get okay right now no assignment is there right now no assignment is there okay right now no assignment is there the first assignment is not there okay it will be available from 22nd september okay okay it is not present yet okay the assignment one is not present i had checked i had checked the assignment one is not there so yeah yeah okay assignment is uploaded from our side but it can be visible to you by 20 seconds okay is it fine yeah so i hope so that's it from my side anybody having any doubt then you can ask otherwise i'll upload this particular ppt as well as the ipynv right now okay i'll upload that particular right now

okay so after finishing this particular class i'll upload now okay anybody having any doubt then i can give the answer okay inside the code i'll upload right now actually i don't know that you can check with the moodle team only because the assignment you can see you will get the five to six days okay you can get okay so I hope so things are very much understand why you so that's it from my side I'll upload your assignment right now okay I am uploading your assignment right now so you will able to get the thing okay huh what happened first teacher classes so you can take the help from there and you can copy paste this particular thing okay copy paste you can get this particular thing okay i'll upload that particular thing okay fine so i'll upload the assignment so that you can get this thing okay okay so last example you said if we take an example what is the role of confusion matrix is used for the classification problem okay confusion

matrix classification no no no single assignment single assignment is there no separate assignment is for the theory and lab okay theory and lab ke liye alag-alag assignment nahi hooga okay so this is there so i'll upload this yes i had uploaded you can refresh it and you can see that particular things over there okay so i need to upload one more thing that will be yes i had uploaded both the things you can see okay you can see you can see so that's it from my side will linear regression will be asked no no no assignment one will linear regression is not there before that everything will be asked okay so that's it from my side thank you so much for connecting yeah thank you thank you thank you so much yeah thank you thank you i'm ending this particular class we'll meet in the next class with the new topic okay

