Page 241 - AI Ver 1.0 Class 10
P. 241

• K is selected from the database closest to the new sample.
                    • K such as K=1 or K=2 will be low and your prediction is less stable and have outliers in the model.
                    • Large values for K are better for the accuracy of the prediction.

                    • If we pushed the value of K too far then we might face an increasing number of errors.
                 Some important features of K-NN are:

                    • The KNN prediction model uses the concept of new data surrounded by neighbouring data set to determine
                   its category.
                    • Similar data points are placed close to each other.
                    • Uses the properties of the majority of the nearest points to decide the classification of the new data added to
                   the data set.


                 Applications of KNN

                 Some of the applications of KNN are:
                    • Recommendation Systems: Companies like Amazon or Netflix use KNN when recommending your favourite
                   show to watch on Netflix or your favourite dress to shop from Amazon. They gather data on the basis of the
                   frequently watched show or shopping done on their website and apply KNN. The companies will input your
                   available customer data and compare that to other customers who have purchased similar dresses or have
                   watched similar movies and will show the rating and recommendation.

                    • Credit Card Fraud Detection: By using the outlier values in KNN algorithm the system can easily predict the
                   possible frauds in credit card systems.
                    • Banking and Financial Systems: It is used to predict the  credibility of a customer whether he is a prospective
                   customer to sanction loan and will not add up to the bad debt of the bank’s account.
                    • Voting Systems: With the help of KNN algorithms, we can classify a potential voter into various categories and
                   predicting the result of the voting.


                 Advantages of KNN Algorithm

                 Advantages of KNN algorithm are:

                    • It is simple to understand and implement.
                    • It is very versatile for regression and classification.

                    • Adding new data to the dataset, does not require retraining a model.

                    • It gives high accuracy using simple supervised learning techniques.

                    • It is very useful for nonlinear data.
                    • It is more effective for large training data.


                 Disadvantages of KNN Algorithm

                 Some of the disadvantages of KNN algorithm are:

                    • Accuracy of the algorithm depends on the quality of the data.
                    • The cost of predicting the k nearest neighbours is very high.


                                                                                              Data Science  239
   236   237   238   239   240   241   242   243   244   245   246