Automatic Classification of Lung Sounds Using Machine Learning Algorithms
Ahmad Ullah, Muhammad Salman Khan, Misha Urooj Khan, Farrukh Mujahid
Abstract
Lung sounds provide substantial information about the state of respiratory system. These sounds are frequently influenced by noise from heart and muscles which complicate accurate diagnosis. This research concerns development of an efficient framework for automatically classifying lung auscultation sounds. Two well-known publically available lung sound datasets are utilized in this work. A total of 280 lung sounds of a varying duration of 3 seconds to 1 minute with sampling rates of 4k, 10k, and 44.1k Hz were used. The raw signals were first pre-processed by resampling to 4 kHz and zero-padding for uniformity and fixed-length duration, and then segmented. Next, Mel-Frequency Cepstral Coefficients (MFCCs) and Short-Time Fourier Transform (STFT) were computed. Then 3,299,341 combined extracted features were used to train (70%) and validate (30%) models including Artificial Neural Network (ANN), Support Vector Machine (SVM), K-Nearest Neighbor (KNN), Decision Tree (DT), and Random Forest (RF). The best results were obtained with STFT+MFCC-ANN combination with an accuracy of 98.61%, 98% F1-score, 98% recall, and 99% precision.