مجله انفورماتیک سلامت و زیست پزشکی (Dec 2023)
Optimizing the KNN Algorithm to Diagnose Obstructive Pulmonary Diseases
Abstract
Introduction: According to the World Health Organization, lung diseases are the third cause of death in the world. These diseases are chronic, so early diagnosis of these diseases is very important. Pulmonary function tests are important tools in examining and monitoring patients with respiratory injuries. This research aimed to optimize the K-Nearest Neighbor algorithm, which facilitates and accelerates self-assessment and interpretation of spirometry test results with higher accuracy. Method: In this study, a method is proposed that improves the limitations of the basic algorithm by optimizing, valuing features, and weighted voting. Using this method, obstructive pulmonary diseases are detected based on the data set of spirometry tests, and general parameters are classified into three categories, namely, asthma, chronic bronchitis, and emphysema. Results: In determining the appropriate method for calculating the data distance, the Minkowski method was chosen, and by applying the coefficients of the feature values, the accuracy of the classification increased. Weighted voting was done in the final part of the algorithm based on the Gaussian kernel, based on which a constant performance was obtained for changing the parameter of the number of neighbors. The results of the evaluations were carried out in the form of mutual validation. 95.4% accuracy and 93.2% precision were obtained in 3.12 seconds. Conclusion: The use of machine learning algorithms can be effective in the analysis of medical data. Therefore, in this study, these approaches were used to provide a new method of classification, so that the proposed algorithm could improve the basic method, and also, had better accuracy and performance than other previous methods.