# Advance Machine Learning

- **Course:** 6103 - Advanced ML
- **Recorded:** 2026-09-05 09:24
- **Transcript:** 628 segments, 12003 words
- **Made by:** deepdml/faster-whisper-large-v3-turbo-ct2

---
okay so good morning all yes good morning good morning good morning thank you okay good morning good morning okay so yeah there is a limited participant is there so we'll just wait for two to three minutes let everybody have to join then we will start the session thank you all and good evening good morning good morning okay so yes good morning we'll start the session so in the theory you had already learned about the linear regression gradient as i saw in the comment section so you had learned this particular things so we will see the implementation of the linear regression and the multiple linear regression all of these things and in the next class okay in the next saturday we will see these particular things before we are going to uh apply these particular things for all of these kind of things we are requiring the all the five library okay all the five libraries so we had already covered the numpy in the pandas so what do you mean by the numpy numpy is the numeric python okay we had

used the numeric python for that while the second one is the pandas pandas is useful for loading the data set after that we need to analyze the data set so that all kind of the things we had covered in the last class in today's class we will see the two important library that will be the matplotlib as well as the scikit class okay once we are done with this two library then we can go ahead with the any kind of the uh machine learning model okay any kind of the machine learning model just like linear regression or all of this thing is there so i had already uploaded this complete file to on your uh moodle okay complete file on the moodle so you need to take whatever the required thing is there here lots of thing is there but you need to learn only about the uh only about the numpy pandas the medplotlib and all this kind of thing is there okay so this particular thing is there so now we will start with the matplotlib yes okay so again before

moving to the next library we need to understand how this five library is very much important so if you need to implement any kind of the model just like linear regression you had understood the linear equation that is the y is equal to mx plus c abhi i am not explaining every that particular things but i need to tell because here the x and y is the numerical kind of the data so for for becoming or for uh creating the x and y we are requiring the numpy okay we are requiring the number so numpy is very much important then second if there is a data set then we need to use the pandas for loading the data set okay after that we need to draw the line or we need to draw the graph or the scatter plot all of these things are responsive and all of these things can be created using the matplotlib okay matplotlib and after that the this kind of algorithm we need to implement and for implementing then we are using the scikit learn okay scikit

lesson so this is the library and there is a one more library is there that can be the c1 okay but this c1 can be used for the high dimension kind of graph okay so although we can generate the diagram with the help of medplotlib as well as the c1 okay now the next library is called as the medplotlib medplotlib is responsible for the data visualization okay the data visualization so what do you mean by the data visualization that whatever our data is there whatever our feature is there we need to represent okay we need to represent that kind of uh things over the graph okay over the graph chart pie chart all of these thing is there so how and what is the impact of met plot live that here we can see the data distribution okay that how the data is there suppose that there is an example house price prediction so here is the price is there and either number of or the locality is there so here are the different point is there how we can see that are these two are the feature okay these

two are the features suppose that this is x and this is y okay so what is the relationship between these two features that we need to see using the matplotlib okay so matplotlib is the low level graph plotting a library that can be useful for the visualization kind of thing okay so again it is an open source and freely available thing is there it is created by the john d hunter okay so this this is already present in the python okay it is already present now the metplotlib is mostly written in the python but some of the segment is written in the c c plus plus javascript all this thing is there but we will use that particular things using the uh using the data using for use for the matplot oh sorry for data visualization now there is a installation so all of the library is can be installed like this okay pip install or whatever things we need to write so pip is the packet uh package installer is there okay that can be used to install any kind of the library

so now we need to use the pip install matplotlib once we are installed then we need to import the matplotlib okay we need to import the matplotlib now matplotlib means okay matplotlib we need to import and how we need to go ahead okay so the thing is that this is the third party library is there and we need to import just like we had imported import numpy s np okay this same pandas spd similarly medplotlib splt anything you can do okay or there is a so the similar one the first example of using this that we need to import okay we need to import the medplotlib.pyplot okay so pi plot is then again class so we had called this as a that particular thing then as a plt so whenever we are using this complete thing we can use the plt in place of this then we need to import the numpy as a np okay because we need to deal with the numeric thing okay so that's why we are writing this then there is a x point that means we need to write the np.r

that is 0 to 6 that means what number is there 0 1 2 3 4 5 6 okay so this is there while the y point is also there okay by sorry the 0 and 6 there is a two point is there in the y point also in the y axis we had to install that 0 250 so this is the again y point so x point hai y point hai now plt dot plot okay plt dot plot plt dot plot ka matlab kya hai that means there is a already we had installed and we need to plot or which kind of the plotting we need to do x point and the y point so then after that we need to showcase the plt dot so okay plt dot so we need to showcase so the output is there that that zero comma six is there okay zero comma six is there so this is the zero and six so see zero pay the value is zero while at six the point is 250 so this is the two point okay and we need to draw the line over this directly we can showcase okay so this is how we need to showcase the particular thing so once we

need to copy okay as you can see there is a yeah yes so this is there we need to copy yeah now i need to run it here you can see here you can see okay so this is how one kind of the representation is there so whatever the information we are having because once we are moving toward the model okay in the next class okay from the next class onward we will directly see the linear regression okay so once we are seeing that particular thing so that all things whatever i am telling right now or in the last class that all things can be used in prerequisite manner that we are not explaining that much thing okay we are not explaining that much kind of thing is there okay so that all thing are there okay so once we are moving ahead then we need to see that that particular thing so this is how that particular thing is there now we will see this is the first that we had already see okay but if you need to update anything if you need to update anything then

you can see this kind of thing okay that means whatever the value we are having okay whatever the value we are having then we need to run it and there is a different different x-axis and the y-axis is there that means at the first point whenever the x is equal to 1 then the y is equal to value is 3 whenever the x the value is 10. okay so this is there only that things we need to update otherwise all the things are the same okay now there is a one more point is there there is a one more point is there and what is that particular thing suppose we have a import numpy everything is same x point is there y point is there why the plt plot is there and plt so is there all the thing is there but whatever the what the thing that we need to understand here the that marker is there that can be called as the marker that means how if we had not written anything then the we had drawn the line but if the marker is there then we have to put the point over there so as you need to see as

you need to see this particular thing so if if we are doing any kind of the coding or the model we need to prepare then we need to understand how we need to do the representation okay so for understanding this this all things we need to understood okay so now we need to run it here you can see there is a two point only and if we are not writing this particular thing okay then what happened the line directly the line will become okay line okay so that particular things are called this okay now if the point is like this there is a only a x point oh sorry only the y point is there now you can see now you can see if there is a no two feature is there or not two excesses there then in that particular manner you can see you can see there is a three okay three point is there this is the three this is the eight this is one or ten that means it is taken the x point as a y default okay that can take the x point as a y default manner okay so

y default manner maybe the value can be come so this is called as the uh this particular met lot live kind of thing is there so this is the fourth thing this is the fourth thing now we are moving ahead and we need to see this particular thing okay we need to see this particular thing so this is the copy and this is this i need to explain okay i'll tell i'll tell what happened because we need to go ahead and we need to see how we need to showcase the graph in the more uh graphical manner okay graph core we are requiring this so all these things are the same x or y k point we had given we had plotted but now we need to give the x level and we need to give the y level so for the x level we need to write the average pulse and for the y level we need to give anything okay so it's your choice that what you need to do okay this particular thing is very important because we need to visualize the results also okay so just like

you if you need to write anything on the research paper or if you need to write anything that you need to implement if you need to build any kind of the project that shows the some of the graph so graph co showcase karne ke liye what kind of the library you need to if you had prepared the machine learning model and if you are not able to draw its analysis or the interpretation then there is a no use case kind of thing is there so if you need to showcase the result how you can showcase the result the you can showcase the result through the visualization manner and for the visualization you need to understand the metro met locally okay so that's why i am explaining that much thing okay because once the model will start then the everything is going in the very fast manner this kind of the things we can skip sometimes okay we can skip some time so that's why i am putting lots of effort to understand this kind of thing although this all are the very

simple thing but we need to understand because it is the starting kind of the class is there okay so now now we need to run this particular thing so running means here you can see the average pulse is written at the x-axis while the calorie voltage is written in the y-axis so this is how that particular thing is there now again there is a one more uh structure is there okay that means the in the previous we had written the o okay line style but here we had written the dotted now you can see now you can see everything is same the everything is same but only we had written or the dotted so this kind of the figure we have to create okay this kind of the figure that we need to create so these particular things are like this that means we can change the visualization way okay this is this thing where we can change with the digit like in this particular manner okay so this is there now there is a this particular so

in the advanced model we will start the deep learning yes for the deep learning vital tensor flow library that is used is there any plan yes 100 we'll cover the uh tensor flow and we will see the neural network convolution neural network transformer all the things we will see okay in this particular subject we will see all the things just like a transformer the cnn nlp everything we will cover okay i'll cover everything so uh we will play yes x level plt dot x level and uh yeah x axis data you can write you can write this particular things it is not giving any kind of the error because whatever things we need to return under this the everything we can plot what kind of the error is there that can be you need to see module okay that has no x level okay plt dot x level okay your spelling is different x label x l a b e l is there here you can see el and in your thing the x l a b okay that kind of the problem is there okay yeah

please past program here i had already given i had i had already given this complete file on your moodle you can check and you can copy paste each and every program and you can run and you can do the practice i had already given this kind of the file to on your moodle okay you can check okay but here they are the complete python file is there but you need to learn only about the numpy pandas met.lib and the scikit-learn okay that things you need to so this is there the yeah uh yes so there is the title sometimes we need to write the title of that particular thing so that means the sport watch and data so this is the title we are requiring so for that plt.title plt.x label plt.y label okay and the calorie voltage all this thing is there now we need to showcase this particular thing so this is how we can showcase this particular now after that we are we need to write the plt.grid so that whenever we are in the

childhood we had used the graph paper where the so many grid is there so if you need to build that kind of the graph then we can use the plt.grid and the plt.so method can be useful plt.so method can be useful for so kissing the graph if you had plotted this particular things the graph cannot not see but the plt dot so method can use to showcase the graph okay so if you need to run this kind of the graph then again okay yeah because yeah after that here you can see the grid how you can look like the grid okay how the grid looks like okay this kind of grid grid you can see grid at the background okay so this is there now we will see ahead and there is a subplot concept is there subplot concept is there that means there is a matplotlib kind of thing is there then we are creating the subplot okay subplot means we have to draw the one comma two and the first graph is there then there is a second graph is there that means we need to draw

the two kind of graph okay here you can see okay here you can see like this okay here you can see like this then we need to run it here you can see the graph okay there is a two graph in the one graph that means that means this is the pi subplot is there okay so this kind of thing is already there now after the line graph there is a one more graph is there that can be the scatter graph okay there will be the scatter graph so all the things are same the x axis is same y axis is same only the thing is pnt dot lord but here we had written the scatter okay scatter so the scatter graph can be useful for showing the data distribution okay data distribution just like i am copying this particular thing okay i don't go that much fast as we are writing okay okay so i had already uh one thing you can do i had already given this particular uh doc file or to you so you can also copy paste that particular code okay you can also copy paste i had already

given you can download that particular things and at the same page number that is a 81 page number you can yeah subplot is just like here the one plotting is there okay here the one plotting is there is you can see the the first plot first plot name is 0 1 2 3 3 8 1 10 so this is the one plot okay yeah i'll tell the subplot subplot is just like there is a complete one plotting is there and in this one plotting if we need to draw the multiple plot okay then we need to use the then we need to use the subplot over this okay so this is the subplot one this is the subplot to according to that particular thing okay according to that particular things we will use this particular thing okay so this this one comma two one comma two is just like there is a one is there and how many subplot is there two subplot and out of this subplot what the plot we need to print the one one the one plot is there there is a two subplot we need to create

and what we need to do second subplot we need to showcase so this is the second subplot and this is the first subplot just like if i am changing this particular thing and if we need to run it then here you can see the second plot is coming at the first and first plot coming at the second so like this we can draw the subplot okay like this we can go ahead and we need to see the sub plot so sub plot is just like a plot that can be useful okay that can be useful for plotting the two kind of the graph in the one graph in the space of the one graph you can plot the multiple plots just like a 10 plot if you need to draw the 10 plot in the simultaneously manner okay then you can use okay now here the yes yes i am not going in the can you so can you so plotting of whole data set whole data set we cannot plot okay there is a two kind of axis is there two axis only so two axis but though feature xr we can plot

if you need to plot the so many things in the one graph then we cannot but we can draw the many kind of the subplot that can showcase the different different uh thing okay yeah okay so at the last i'll also share the notebook also okay okay okay so this is the scatter thing okay this is the scatter thing so that we can go ahead and then we can see the data distribution over there so data distribution can be the escape can be showcased using the scatter plot so i need to showcase here you can see the scatter plot this can be called as the scatter plot that will showcase what are the data point is there it will showcase like this okay so this is there now just like we are going ahead and we need to see the import matplot everything is same x and y is there so we can showcase the one graph again the day two we are showcasing this kind of graph here you can showcase okay as you are talking about if you need to showcase the complete uh data set in

the one graph then this is how okay that means day one data is the first one okay then day two data is like this okay now you can say say this particular thing here you can see that means day one is showcasing using the day one is showcasing using the blue color while the orange color can be useful for the day to data okay so this kind of thing we have to explain now there is a different so it this is very easy easy thing is there okay this is very easy easy thing is there just like everything is same only what things you need to showcase the scatter things we need to change okay that means it will change the scatter okay now there there is a plt dot bar okay so it will showcase the bar graph okay it will showcase the bar graph so here you can see okay here you can see difference between the scatter and uh using dot well there is a no differences there only the visualization way is different different there is a no clear difference between this okay only

although the dot point is also the same okay dot point is same but the scatter there is a complete scattered graph is there and the dot point is just like a line graph is there okay only the visualization is different there is nothing like the difference is there everything is showcasing the same kind of thing okay everything is showcasing the same thing so now we need to see the bar chart okay bar chart we need to give the x-axis as well as the y-axis you can give any kind of thing but only thing that you had updated that will be the bar okay we can give the x-axis or the y-axis and here we need to run so it will showcasing the bar chart uh yes same source data is static but there is a various way yes hundred percent it's just like a data analysis kind of the tool there is a lots of tool is available right now that can do the visualization because there are lots of data analysis as well as the business analyst is there that can do that kind of thing that we are having

the data then how we can represent we can represent using the graph you can represent using the uh the wall chart you can represent with the pie chart everything is like this that how much cell we are having in the past month just like there is a one use case in the march what kind of cell is there in the feb this kind of in the january this kind of in the december this kind of that means this is the real use case where we can plot this kind where we can use this kind of thing is there okay there are tons of the tool yes hundred percent the tableau is there the power bi is there everything we can use okay import matplotlib.py plot is a pld uh import in the line add in it is the line one import matplotlib.py plot invalid non-printable character uh this is the same thing okay uh javascript yes yes you can embed so you need to search that particular error because that is coming in your computer the code is the com the complete

code is good okay correct but there is a error that you need to showcase okay so this kind of bar chart is there so you can practice that particular thing that the bar h is there that it will be used for the horizontal and if you need to change the color if you need to change the color then you can write the color as a red okay you can change the color also just like i am copying this particular thing and we can write okay yes i am i need to copy only this much because all the code is same okay all the coding is same only the thing is that here we need to give the comma and here we need to write so that it will what happened yeah okay the color is changing okay here the color is changing you can use anything okay so this is all the thing okay now there is a bar chart is there there width we can change okay there are lots of things is there so we can change the width also uh okay there is a yeah 100 percent voice is not clear my

is my voice is not clear or the voice is clear yeah voice is clear okay okay okay uh some garbage character yeah yeah yeah yeah okay okay thank you thank you okay if you are at your end my voice is not clear then you can check your internet connection yeah okay so this is all the things about the matplotlib through the matplotlib you can draw the different kind of bar chart also now we are moving to the histogram okay histogram is again one kind of the representation thing is there okay so for the histogram all the things are very much clear all sorry all the things are very much same only thing that we need to generate only thing that we need to generate is called as the hist okay only thing that we need to write only the plt dot h and there is a x so in the x we had used the one random function okay random function so this is just like a random function that we need to draw and we need to run that particular thing

so if you want to see the what is the x then we can print the x also okay that what the things are coming okay so this is the thing there is a that much of information is there that we need to print that means the 70 to 10 that all the data are in between this particular things okay okay so this is how we need to do the plotting of the histogram so histogram is again one kind of the visualization thing is there okay visualization thing is there so you can use this particular thing okay you can use this particular things also so there is a lots of thing is already available that one by one you need to see that particular thing okay so only difference is that you need to write the history okay here because all the other things are very much same only difference is this now next is the pl pi so in the pi only things that we need to understand that will be the plt dot pi and that will be the y so this is there okay so y is equal to np dot array

and that particular thing is there and we need to showcase this particular thing now we need to showcase okay yeah okay okay so this is there so if we need to showcase the pie okay how we how we need to go ahead and we need to copy paste so that we can see the pie chart okay so plotting an array in the histogram is not possible sir uh just like okay array no no not possible because we need to give the median okay and we need to give the that center value okay this is the center value that is the 170 we need to give directly we need we cannot draw the histogram okay directly we cannot draw the histogram because we had given the that particular thing the 170 is like this okay that's why we need to go ahead sorry so yeah here yeah here you can see the wall chart oh okay that means we had given the 35 or the 25 25 or 15 so that kind of percentage we can so so this is again one kind of the uh in one kind of thing okay the one kind of the representation we can say

the real life of the histogram histogram is the yeah see histogram is the frequency of the element okay that means how much it is coming just like you can see you can see okay visualization is just like histogram is just thing that we need to showcase our value whatever coming okay but we cannot see with the two axis kind of thing is there that means don't know excess ka data nahi hai us ke liye we need to give the multiple value okay histogram banane ke liye we need to give the multiple value that's why the array say we cannot draw okay its definition is like this we cannot do anything its definition is like this that we need to give the multiple value like this okay so just like if you need to have any doubt okay then you need to go ahead and you can search the histogram okay so histogram values okay but what things are required okay so yeah there is a multiple thing is there okay just like this is there okay so this is the again histogram

okay this is again the histogram that two three three that means its frequency is there okay we can draw like this okay so just like if we need to draw okay if that beans is there okay then we need to see the thousand kind of thing so that we can draw okay so this kind of things is there that's why we need to showcase okay so here density the syntax that means there is a x is there while bins is there color is there h color is there label is their density is there so what the x x specify the input data of the plotted that means what the things we need to plot the bins is specified the number of interval that can be used okay for the group so by default the value is 10 that's why we had written 10. okay now at the end we need to add the label of the these particular things we need to showcase the color so this all things we need to showcase so this is there the yes x is an array you can use uh now we have to showcase yes we need to give the

now we are moving ahead with the pie okay so if you need to give the label on the pie chart okay if you need to label on the pie chart then we can see the here the complete data is there okay complete thing is there and my level is this particular thing that means the 35 is for apple 25 is for banana 25 is for cherry 15 for the debts okay that means we need to showcase and we need to sorry we need to that particular things that level we need to declare and we need to showcase okay the similar thing similar thing here all the things are same only we had give the start angle as a 90 okay so here you can see i'm copying this so that you can clear both the things okay both the things now you can copy and we need to run it here you can see we had started with the 90 degree okay previously but we had started with the 90 degree or 90 degree but the whatever the percentage is there accordingly they had selected this particular thing okay so this is all about

the matplotlib okay this is all about the matplotlib that we need to showcase the matplotlib over there okay we can showcase there is a last program is there that can showcase okay that you can showcase so we can draw the pie chart we can draw the wall chart we can draw the histogram all the things we can do just like this okay just like start angle is just like yeah okay okay okay okay start angle is just like here you can see the 90 degree okay now if you can draw it as a 180 degree now you can see okay now you can see that all things whatever the thing is there it is changing that means it is changing by angle okay here you can see okay whatever then we can start from here okay we can start from here okay but we can change or we had run that particular thing as a 45 degree that means it this particular pie chart is tilted to the 45 degree okay tilted to the 45 degree and if we have to write the 90 okay then we can see it is

started from the 90 degree okay that means it is not tilted anywhere okay so that means the start angle where we can start okay we need to start that things we need to showcase huh uh proportion of each element remain the same even if the angle yes hundred percent the proportion is same only the starting thing is different okay if we have not written anything then you can see the y default thing okay you can see the y default thing here the y default thing you can see it is started from anywhere okay it has started from anywhere yes it is it is same it is a hundred percent thing okay but if you need to do this particular thing and this is the 67 okay that means 67 percent it is still there oh sorry sorry sorry okay there is a one more thing is there yes yes it is there okay here you can see okay it is changing it is changing now there is a one more thing is there that is the my explored okay that means if you need to

showcase anything okay if you need to showcase anything and if you need to showcase anything just like apple apple we can write the 0.2 or 0.5 whatever you need to write the number okay and if you need to cut this also okay then you can see second we have cut okay like this that is the showcasing kind of thing is there okay you can choose anything this is just like a showcasing kind of thing is there okay so this is all about the matplotlib so this is all about the matplotlib so matplotlib is mainly useful for the data visualization okay it can be useful for the data visualization kind of thing is there so now now we need to move ahead and we need to see the scikit-learn and the scikit-learn is the most important library as we need to see okay it is is the hundred percent important thing from the next level onward we will completely see the scikit-learn only okay then from the next level onward we will see completely use case of the

scikit-learn so what the scikit-learn is you uh meaning so scikit-learn is the most useful we can say and the robust library that we are using for the machine learning kind of thing okay because all the model all the statistical model are comprising inside the scikit-learn okay so it can provide the selection of the efficient tool of the machine learning in the machine learning as the sir taught to you about the pre-processing and whatever the linear regression all the things are comes under the scikit-learn where you had seen about the classification regression the clustering kind of where there is a supervised unsupervised learning is there all the algorithm are comes under the scikit-learn okay so scikit-learn is directly useful for implementing the machine learning model yeah 100 i had covered the bandas and numpy yeah so the library that we are used okay that you are used in the python that is built on the

mad numpy sci-fi or madflotlip everything is there okay now we need to see the pip install scikit-learn we cannot write the minus you you can remove this particular thing if this is for the super user okay so pip install scikit-learn through this we need to install the scikit-learn okay and that can be useful for what kind of the task where you here you can write the pre-processing of the data set okay data set pre-processing earlier we are requiring the next thing that can be that train test split and ml model okay all the things all the things we can use or for all this kind of the things we are using the cyclic so this is the most important or the mathematical thing is there okay so inside the inside the scikit-learn there is a some data set also there okay there is a some data set is also there so if i need to showcase if i need to showcase here the scikit-learn oh sorry yeah here scikit-learn okay then this is the first

library where the thing is there so you can explore this particular things from here also okay this is the very important like this is the very important uh website that can be designed for the scikit-learn itself okay so here the complete thing is about that what things are inside the scikit-learn so we can use the classification kind of the problem that can be under the supervised learning as well as the if our data set is the continuous data set then we can use the regression over there if our things are the unsupervised then we can use the clustering so the gradient boosting nearest neighbor the random forest logistic regression all are considered as the classification so that we will use here while the regression that can be the nearest neighbor linear regression all the things are comes under the regression then clustering we can apply so for all kind of things you can choose the example from here okay here the example is there different

kind of example is there you can choose any kind of the example and here okay you can install just like okay here everything is written so you can copy paste all these things and you can apply over this but one by one what i am telling then you can get this particular things here the classification complete classification everything is there okay i am not telling that you need to use right now okay i am explaining only uh is the same nearest neighbor also we are using the reg nowadays uh yes same nearest neighbor we will see the nearest neighbor algorithm in this upcoming classes okay we will see everything we will see okay but i am explaining right now that what things we are requiring okay we are we need to use the super sorry the scikit learn okay so installation we can do so the install the thing is there so you can write the installation and all the things are there okay so all the things are inside this then there is a user

guide is there that all the model as you can see the linear model this lasso that are lots of things are inside this just like a kernel sbm okay so every implementation is here only okay every implementation is here only here you can see the complete list is there there is also some of the data set is also there okay some some data set is also there okay so there are lots of data set is available suppose i use the jupiter where this library install you can write on the jupiter also here here here here you can see okay just like this you need to write this then sorry like this then pip install numpy like this okay and here you can see like this you need to install okay yeah if you are using the collab no need to install okay okay no need to install yes hundred percent this kind of the library is available in everywhere okay everywhere you can choose any kind of the id over there okay so that means this particular is having the complete

data set that means inside the sklearn inside the sklearn sklearn dot pre-processing is also available sklearn dot data set is also available sklearn dot ml model is also available that means the sklearn is the very much important library okay so we'll see the very first library uh sir i'm facing issue to install the zupiter okay so if you are not installed the zupiter then first thing is that you need to download the anaconda okay anaconda distribution download karo in the first class i had told okay so you can see the recording over there okay so the first thing is about the data set loading so for the data set loading we need to start the from sklearn dot data set that means the data set are present inside the sklearn then we need to import the load ids so load ids is in one kind of the data set that are already present in the sklearn so there is some inbuilt data set is there there are some of the inbuilt data set is there that can be

called as the load iris so load iris kaha par available that will be the sklearn dot data set and we need to import the load iris so this is how we had loaded the data set although you can load the data set whatever we have to upload through the pandas also you can load the data set okay then you can perform the various tasks from the sklearn but this is also the one way but here we need to see only the inbuilt kind of data set so that means we have to load the irish data set okay and this iris data set is inside the iris that in the x we need to showcase the iris dot data so whatever our thing is there iris dot data we need to write in the x but whatever the inside the target then we need to write the irish.target now i am explaining now i am explaining uh yeah so we can use yes you can use the google collab also the anaconda yes 100 anaconda is the heavy application but if you need to build the any kind of the project that we need

to use okay is there any way we can check the inbuilt data see 100 in which there are lots of inbuilt data set is there here you can write the sk learn data sets okay here the sk learner dot data set there are lots of data set is there okay this all are the data set okay this all are the data set here the load irees okay so that's why we had to load the load irees data set so how it is looks like here you can see okay there is a three classes is there and there is a different kind of thing is there so inside this inside this there is a data is there okay data is there okay the here the data is there and there is a sample is there okay so there is a two i need to explain this particular thing uh yes yes yes yes yes okay so what you need to see there is a inside the irish data set okay inside the irish data set there is a two kind of thing is there here the data is there as well as the target is there target is such thing that we need

to get and that can be the dependent variable and here the independent variable and what do you mean by the independent dependent variable that means we are having the so many feature is there and that particular feature is considered as a data while whatever things that we need to classify that can be considered as the target okay that can be considered as a target so there is a two kind of thing is there iris the data as well as the target so the data are coming in the x x x variable and the target is coming in the y so this is how that particular thing is there now there is a irish dot feature name that means the feature name is already there and we need to store the feature name while the target name also so irish dot target name then we are having the feature name and target name okay so that means we are having the x x can the we are having the data while at the y the irish dot target is there while the feature name is there while the target name

is there okay now we need to print whatever the feature name is there whatever the target name is there and we need to showcase the first detail row so now if you are copying this particular things okay because in my system in my system the jupiter is sorry the scikit-learn is already present okay already present so this is how we need to copy and we can showcase so there is a one data set is there okay so what kind of the feature is there and what kind of target name is there so in the feature there is a sepal length is there sepal width is there petal length is there and petal width is there and here you can see this is the sepal length sepal width then petal length or petal width or iske alawa we are having the one more thing that is the target suppose this this this this are the containing the setosa while the another one is the versicular that means there is a three target name is there so that things we need to

classify okay uh where we got this i had i had already given okay i had already given this is already i had given okay so from here i had copied okay i had copied this particular thing so this is the complete structure is there okay so that means the sk learn sk learn is useful for the data set okay to load the data set so that i had to explain now next thing that i need to explain okay the next thing i need to explain that how we can split the data set that we are having the 10 000 row suppose we are having the 10 000 10 000 row may say we need to uh get the seven thousand row as a training data set while three thousand row is a testing data set then how we can split how we can split the data set so for splitting the data set we are also requiring the sklearn so sklearn is the most important library used for the machine learning if you need to understand the sklearn then definitely you need to practice a lot for the

scikit-learn okay how to decide then when to use this which data set it's about the problem definition okay whatever the problem is there accordingly we need to select the data set the selection of the data set is not dependent on our choice okay sometimes we have to give given the data set okay sometimes we need to collect the data set okay that means the data set uh picking is the all choice complete okay i had given the example that there is a irish data set is available then the from the irish data set we need to split that particular data set yeah any example of irish data set is just like here the irish data set is just like the sepal length sepal width sepal thing petal length and petal width and accordingly there is a class suppose that you this kind of data set is there there is a sepal length sepal width petal length petal width width and at the target the class is there that means here some of the

data is there and there is a one class is written there is another there is another thing there is another then there is another thing just like this okay so it's the such kind of thing is there so this can be the uh this thing now i need to load okay i need to split the data set so once i had loaded the data set we did feature name and target name then we had it's also showcasing the first 10 row now we need to split it okay now we need to split the data set so from sklearn.dataset we need to import the load iris load iris x can the data why can the target hey now now what things we need to do sklearn.model selection inside the model selection we are having the trend test split already the classes is created only you need to use so that we have to import the test underscore sorry train underscore test underscore split okay now i had x whatever the thing is there that we are having the first three column or sorry first four column

in the x while the last column in the y because we had created this path we have divided by y divide that means irish dot data so this is all about the data that will comes in the x and this the complete thing that is in the y now we have to split okay we have to split sample data i need to showcase i need to showcase okay i need to showcase otherwise you will confuse here the data set is not uh visualization is not there okay i need to explain how it is looks like excel you can see this particular irish data set yes it is looks like this okay suppose that there is a different different sepal length or sepal width is there it's a csv file okay it's a csv file and there is a different different point is there and that particular set also it is given the this particular class it is given this particular class it is given this particular class okay so yes yeah yeah yeah this this one yeah you had showcased

this particular thing yes it is looking like this yeah kegel yes it is available on the kegel so do we this kind of data yes it is it is the real data set but say but this is available for the practice kind of thing for the classification to understand the classification we have to look like this okay yes now we had completely just like this is the complete data is there and there is the last one is the species so species is coming in the uh target one while the all the other four column can be or all the other four feature can be treated as a x-axis okay now i need to divide so how we can divide and how we need to convert so we have to divide the data set in the four different ways just like x train and x test so what is coming in the x train x train is the training data and the x data can be divided into the training as well as the testing okay so x data can be divided just like here the 10 row is there then 7 row is divided into the

training while the 3 is divided into the testing similarly y train that means this is the y column y column is divided into the 7 in the test sorry training and 3 in the testing so the x can be divided into the x train x test y can be divided into the y train and y test okay now there is a function that can be the trend test split and we need to divide the x and y and we need to give the test size and test size is the 30 percent we had given you can change 20 15 accordingly and random state is just like randomly we need to select we need not to select because the random selection is the important thing otherwise the same kind of data are coming in the training while the other similar kind of data in the testing that means the randomization is required okay target column will be only one yes hundred percent always the target column is the one because that we need to classify okay where we need to suppose that our problem definition is

that we need to classify the iris species okay so in recording to this particular problem definition we need to select the target column okay we need to select the target column so what kind of the target column we need to select the species because we need to classify while the other can be called as the independent feature so this independent feature are comes under the x so x mein kitna bhi data ja sakta hai but y mein kebal ah mein saa ek hi single data hi ho ga yes you can do the random state y 2 3 4 accordingly you need to share uthne number of time the suffering will be there okay that much number of the time the suffering will be there the at the first random state the pahli bar random data and we had selected then second time the randomly the distribution is there then we had to select now at the end we need to showcase the x training safe by training x test y train and y safe here i need to copy so that you can

understand okay you need to understand so here in the previous code what happened previous code we had selected the feature name so what kind of feature name inside the data this all are the feature then and this is the target that means this is this three things in the target and this is how the data looks like okay now what we need to do we need to showcase we had divided the trend test split now i am running this particular code okay now i am now you can create the 14105,4 that means x train that means 105 number of row is in the x train and four number of column is there and what kind of the four number sepal length sepal width petal length petal width the 45 comma 4 this is in the test okay so x test dot save similarly by train y train means only the last column and how many column only one column is there that's why it is not written so 105 in the that and 45 in the testing so we had splitted the data so scikit-learn can be useful

for the splitted kind of thing also okay now we need to train the model okay now we need to train the model so for training the model i am not explaining any model yet okay but i need to showcase just suppose that we have to use the knerh never there is a one kind of algorithm is there we will see that particular things in the upcoming class what happened with this but you need to understand that we need to use the knn method for the classification kind of task okay how it is happened that is the different history we will see in the next upcoming classes so so for that we need to use the one machine learning model so what kind of machine learning model you can use the knn so knn is the k nearest classifier its name is already present although this code is the very much same the code is same whatever we had explained now inside the sklearn there is a neighbor class is there inside k nearest neighbor is also there and there is the inside the sklearn

there is a matrices is there what is what do you mean by the matrix that will be the evolution parameter ki uski accuracy kya hai uska precision kya hai how our model is good enough that means there will be the matrices so that is also available inside the sklearn so you need to think how matured this library is kithani matured library okay so that means inside the skln dot neighbor already the k nearest neighbor is present and there is a matrix is present now we need to run the k nearest neighbor classifier and here we need to give the sum of the neighbor that how many neighbor we are having so we had given the three you need not to worry about this how what do you mean by these three we will see this complete algorithm in the next upcoming class but only thing is that you need to understand here is that the scikit learn we need to understand the scikit learn a scikit learn kitana strong so we have to down uh call one machine learning model and we

need to call this machine learning model inside the class if you guys classifier dot underscore cannon now we had uh import this particular thing now the next method is the fit method fit method kya karegi whenever we are having the data set so we are splitted into the x train or y train so here the fit method can be useful for the training okay okay then once the training will complete then we need to predict okay and the for the predict there is a predict method is there and predict method method is always applied on the testing data so a x test data we need to predict okay this is the y prediction so this is the name only okay you can choose any name okay it's a y underscore pred so this classifier underscore knn is the model that we had created to train on the x train and the y train then we need to test on the x test okay and we need to predict so we had predicted that particular thing now how we can get the

prediction how we can get the prediction so there is a accuracy that how how our prediction is too good okay so accuracy how we can predict the accuracy that means we are having the some actual data so why test is our actual data and by prediction is whatever the our model is predicted so we need to get the accuracy score that is the matrix dot accuracy score on this two data and we are getting the accuracy okay and we are getting the accuracy so from here we got the accuracy okay we got the accuracy so here we had got the accuracy and we had printed this particular thing now after that after that what we need to do we need to give some more sample okay that are the out of box data and whatever our model is there we can use our model that is the classifier underscore canon is our model that we had predict prepared and we need to predict over this particular sample whatever the sample we have to give another now we need to predict okay we need to predict

that if this kind of data is there what kind of species is there okay if sir i had said this document please can you say yeah i had already said okay now this particular thing are very much important okay very much important i had explained now i need to run it and here the complete thing is there and i need to run uh where the line number 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 in 18 19 invalid text okay okay okay okay okay okay okay okay okay okay okay okay okay therefore yeah for everything this is the very small thing now after that i i need not to explain anything yes yes i understand okay so this is the complete thing that we had do that particular things in the previous only i had up look call one of the machine learning model now i had called the one matrix that will be the accuracy now we need to fit our model on the training data and what is our training data x train and y train we had created the training and how we can do the

training using the fit method so the fit fit method and we need to give the thing then there is a second method that can be the predicted method and we had given the x test now you got the accuracy and how we can got the accuracy there is a some by test is there there is some by prediction is there and you need to get the accuracy score and this is the accuracy score we need to predict that is the 98.33 percent now we need to give the one out of the box data okay there is a new data the new sample we had provided if such kind of the thing is there that means the pipe is the sepal length five is the petal length this is the sorry sepal length sepal width petal and petal width so this kind of the thing is there that means this particular value is there then which kind of this is the first thing so if such kind of data set is there if such kind of the data set is there which class is this so we need to predict the species and that species

is called as the versicolor and if such kind of thing is there this is called as the virginica so it is giving the 98 percent kind of thing is there okay so that but that particular thing is there okay so that is all the thing that is the thing that we need to understand so humara scikit-learn as you can see okay as you can see the scikit-learn kind of thing is there now after that after that uh as the sample data can we can you add one more yes yes i can do uh yes yeah i can replace i can replace 100 comma 20 comma 30 comma 40 okay here you can see the virginica it will give the virginica okay it is just like an example okay you can give any kind of the sample so we had trained our model yeah accuracy is same accuracy is same why because we are tested and training on the different data but here this complete thing is only affecting this particular thing it is not affecting the accuracy okay so this is just an example you need

not to think about this but i am explaining the sk learner that how the sk learn is important okay only you need to understand we are not focused on the accuracy we are not focused on the thing only you need to understand the sklearn can provide this kind of the task okay so that means the fit method is used for the training while the predict method is used for the prediction while the last one that can be the we need to save the model once we had created the model we can save that particular model so how we can save the model the from the sklearn.external we need to import the joblib so joblib is one kind of the uh feature that can be used for the saving the model now joblib.dump and here the classify classifier underscore knn because we had created the classifier underscore knn okay we had uh got the classifier underscore knn and we can save this model like this the id is underscore classifier underscore knn dot joblib

you can write anything now this is how we have saved the model so whenever we are requiring okay so next time we can load the data set like this that job live dot low load and we can do it so we need not to train again okay the job everything is same the pickle is also the one kind of the saving the one kind of the thing that can be used for saving the model similarly we can use the joblib joblib will showcase the uh model into the h5 okay dot h5 it will save in this kind of extension while pickle is saving the model dot pickle like this okay there is a different different library is there only okay both the things can be used for the same kind of the task okay so that kind of the things we are requiring okay that kind of things we are requiring so that's why we are using the scikit-learn so scikit-learn is useful for the data set importing for the pre-processing for training testing for saving the model or for loading the model all

the things are this sir what is the meaning of saving them are we defining the saving the model is just like we had trained on some data set okay we had just like we had trained our model on some of the data set now this model we need to save okay so that whenever the new data comes we can directly test our uh our thing on that particular trend model okay we need not to again retrain just say i have trained and you have given the model now you can use that particular model you can also use that particular model while loading the data set okay sorry loading the model load out you can use that particular on any kind of the simple directly we can give this kind of the thing and we have data set the same applied on all kind of machine learning yes it is very good it is very good this is very good so i hope so the things are clear with you this we will learn in the next upcoming classes you know so many times some barbers

i could learn barber we will see this kind of thing okay this all things we will see in the next upcoming class for the so many time okay so that's it from my side anybody having any doubt then let me know otherwise i had already uploaded these particular things in the next class we'll start the first machine learning model that will be the useful for the regression so that will be the linear regression okay so that we will see in the next upcoming classes now anybody having any doubt then let me know otherwise from my side the class is over now yeah okay i had already uploaded this particular file so that you can do the practice a lot okay and you need to explore the sklearner.org where you can get everything okay so okay thank you so much thank you so much for attending the class yeah assignment from the lab also yeah a little bit assignment you will get from the lab also yeah are you going to discuss about the training yes hundred percent training

the model will start the training the model from the next level the first thing is about the we will start with the first model that is the uh uh linear regression okay yeah thank you thank you thank you so much thank you so much yeah okay okay thank you thank you thank you for your wishes yeah okay so that's it from my side you will uh so i need to stop the recording so that you can when will be the first assignment it is about the one after the one week after the one week you will get the assignment okay okay so i need to stop the recording so that you can get that thing okay can you uh i'll i'll tell the k nearest neighbor is the bigger algorithm so we need to see in the upcoming class hundred percent yeah okay so i need to stop the recording

