 students in this module, now we will practically see that if you implement the KNN model on any available data set then what steps are involved and how will you handle it in the first step, in the last example, there were some libraries, like I said, first grade is pandai, scikit they are very very useful and will be very useful in different situations so the first step is that you have to import the scikit-learn package of the library then you have to define the features and the target variables then if you have a lot of data, like I said, you have a data set of 5000 so what you have to do is to split it into training and test I have taken 50 records for training and then for testing I have taken another 50 based on that you have trained your model and then you apply on the whole then you run the whole algorithm on the whole so just hypothetically speaking, practically you will get millions and millions of records in lakhs when you deal with this kind of situation then what you have done is that you have done these two steps, training model sorry training data, you tested the data on your model then you generated its values then you saw that your train and fit the data into the model then you predicted the future so basically you have 5-6 steps that you have to do step by step now what you have to do is that you have to select the number of K of the neighbors you have total of K, then you have to calculate the distance of the neighbors then you have to calculate the nearest neighbors then you can understand the distance of the neighbors then what you have done in this you have calculated every category it will automatically do your software so basically you have made different classifications or different peripheries now you have allocated these two categories based on the distance from each other then you have assigned the new data point to the category for which the number of the neighbors is maximum then you have determined the model on which you have to use it now in the next slide we will see the code in this slide all the steps that I have told you the code is available in this you will see it the important thing is that your hash sign is commenced just to guide you what your code is and the actual script of your code is not there so wherever you see it, you will understand and it is better for you to do coding and it becomes self-explanatory code when you see someone else's code when you see his comments, you will understand what he wants to do any previous developer who has done this code why he has done this or what he wants to do and when you write a code, make sure that you also write your comments properly so that when you work in a team then it plays a very very positive role so that everyone has an understanding of each other's work and as a team, you can produce a bitter result now in this, we have seen the scikit-learn and in the other steps, you have imported it neighbors, all these things and the beauty of Python is that the model of linear regression we have talked about is built-in you have to import and implement the model you have to write a code to implement the model you don't have to write a code to make a model so as we used to do coding in the era so the model was also complete you had to write a code for the model then you used to do input and output but now you just have to write a code that you have to import it to that library that's it so in this also you have to see that what you have now if you see this then you will understand because I am sure this is my assumption so as much as we have installed Python or some other exercises we have done you must have done that and if still there is any gap then please hands on when you will do this, look at it step by step then inshallah you will be at par and your understanding that will be your understanding will develop very well so in this you have accuracy, macro average, weighted average these are different parameters and this is the result that you want to achieve that again here we have not discussed what is the nature of data please just always keep in mind that these examples are just to help you to develop a basic understanding so if you apply the model of KNN then this step will be the code this is the working code now as soon as you step by step and step by step then you will do your Python environment then for you this understanding that will be a very comprehensive understanding and you will be able to utilize this knowledge in your next exercises