Abstract
Cardiovascular disease is one of the main causes of death worldwide which can be easily diagnosed by listening to the murmur sound of heartbeat sounds using a stethoscope. The murmur sound happens at the Lub-Dub, which indicates there are abnormalities in the heart. However, using the stethoscope for listening to the heartbeat sound requires a long time of training then only the physician can detect the murmuring sound. The existing studies show that young physicians face difficulties in this heart sound detection. Use of computerized methods and data analytics for detection and classification of heartbeat sounds will improve the overall quality of sound detection. Many studies have been worked on classifying the heartbeat sound; however, they lack the method with high accuracy. Therefore, this research aims to classify the heartbeat sound using a novel optimized Adaptive Neuro-Fuzzy Inferences System (ANFIS) by artificial bee colony (ABC). The data is cleaned, pre-processed, and MFCC is extracted from the heartbeat sounds. Then the proposed ABC-ANFIS is used to run the pre-processed heartbeat sound, and accuracy is calculated for the model. The results indicate that the proposed ABC-ANFIS model achieved 93% accuracy for the murmur class. The proposed ABC-ANFIS has higher accuracy in compared to ANFIS, PSO ANFIS, SVM, KSTM, KNN, and other existing studies. Thus, this study can assist physicians to classify heartbeat sounds for detecting cardiovascular disease in the early stages.
Keywords
Introduction
Cardiovascular disease is considered as one of the leading causes of death worldwide1,4. Several advanced techniques such as electrocardiograph (ECG) and computerized tomography are used to detect heart disorders. However, these techniques are costly and time-consuming 5 . Besides ECG, phonocardiograms (PCG), a graphical representation of heart sound signals, also diagnose cardiovascular disease 6 . There are several studies that focus on the classification of heartbeat sounds in the past few years. Based on the comparison done among these studies, lack of high quality, rigorously validated, and standardized databases of heart sound are varying 7 . The cardiac Auscultation method used to listen to the heartbeat is difficult to diagnosis the abnormalities in heartbeat sound for the least experienced medical officer. According to Ref. 8, a study of office-based pediatricians demonstrated low diagnostic accuracy using auscultation skills to listen to the heartbeat, while studies of experienced surgeons were found to have high diagnostic accuracy.
Currently, there is big medical data and artificial intelligence technology, and there is increased focus on the development of deep learning approaches for heart sound classification.9,10 Classification of heart sound is crucial and need to select an optimized classifier. Research on hearts sound classification using an artificial neural network (ANN) model shows it achieved 90% accuracy. 11 A better classification model is needed to classify the heartbeat sound, and therefore other field research is taken into consideration to select a better classifier. 12 In this research, a comparison is made of breast ultrasound classification. The study used ANN, FIS, and ANFIS, and the result shows that ANFIS has 96% accuracy. In comparison, ANN is only 88%, and FIS is 92.3%, proving that ANFIS is a better classifier. This accuracy gives a justification that the ANFIS is a better classifier. Adaptive neuro-fuzzy inference system (ANFIS) has been used to classify the heartbeat sound, and it provides better accuracy than other models. Therefore, it is an appropriate model to classify heart diseases. 13
Most of the existing studies only focus on the abnormal and normal heartbeat sound. Reference 5 has managed to classify heartbeat sound using Conventional Neural Network with 1D local binary pattern and ternary pattern and managed to get only 91% accuracy. The heartbeat sound can be classified into normal, murmur, and extrasystole as well but this type of classification might make the model less accurate. Therefore, a much better accuracy model is needed to classify the heartbeat sounds into these three categories. Based on this issue, a research question is raised as “how to improve the accuracy of heartbeat sounds classification using ANFIS?”.
Therefore, to answer the research question, the main goal of this study is to have a better and optimized ANFIS approached to classify heartbeat sound. The more accurate and faster the heart sound classification happens, the better will be for heart cardiovascular disease detection. In Ref. 14, authors have concluded that artificial bee colony (ABC) is well suited for huge optimization datasets, parameter estimation, cluster analysis and play an important role in medical field for MRI classification. To obtain better classification results in content filtering, ABC with Logistic regression classified shows a 96.13% success rate. 15 This justifies the ABC algorithm can be used to optimize another classifier. Thus, this study aims to optimize ANFIS by ABC algorithm. For this reason, this study proposed a novel ABC-ANFIS framework in which focuses on optimizing ANFIS for the classification of heartbeat sound to improve the accuracy. Instead of focusing on two classes of normal and abnormal, this study classify heartbeat sounds into four classes of (1) normal, (2) Murmur, (3) extrasytole, and (4) artifact. Furthermore, other existing standalone and optimized algorithms such as support vector machine (SVM), long short-term memory (LSTM), and K-nearest neighbors (KNN), ANFIS, and ANFIS optimized by particle swarm optimization (PSO) are used to classify heartbeat sound in this study. Finally, the results of the proposed ABC-ANFIS are compared with SVM, LSTM, KNN, ANFIS, and ANFIS-PSO.
The remaining of this paper starts with background in Section 2, methodology in Section 3, results, and analysis in Section 4. Finally, this paper is wrapped up with discussion and conclusion in Section 5.
Background
Artificial intelligence (AI) and big data analytics for heart disease
Nowadays, massive amounts of data in healthcare must be analyzed in order to identify, diagnose, detect, and prevent illnesses. As big data contains a huge number of records and complex data, big data analysis is challenging. Proper analysis of big healthcare data such as patient records, scan results, clinical prescription and notes, data related to patent family illnesses history, etc. can be used to detect and predict heart disease. 16 Cardiovascular disease studies have become increasingly reliant on big data. Big data analytics has the potential to create more powerful and interesting applications such as prediction models. Big data analytics might provide more accurate predictions of outcomes ranging from death to patient-reported outcomes to resource usage, making them more therapeutically useful. For example, Artificial intelligence (AI) machine learning assesses patterns associated with an outcome directly from the data rather than from a pre-specified collection of variables used in traditional methods. 17 Big data analytical techniques and related research are very crucial for Chronic heart failure (HF) due to “the complex etiology of the syndrome, the large number of risk factors, the high degree of comorbidity in patients, and the prolonged and progressive course of disease.” 18
Al and big data analytics play a crucial role in heart disease diagnosis. It assists in heart failure monitoring, health monitoring after surgery, and health monitoring for oncology patients. There is a prototype developed for computed aided diagnosis for heart disease in which the system is intended to assist doctors in making the decision. The system considers previous patient history, pre-information, and instrument-related data and makes a diagnosis of patient health. This model achieved 86.10% accuracy, and this will be technology on heart failure monitor. 19
AI is also used to assist in auscultation to detect congenital heart disease. Computer-aided auscultation is created to help the doctors to evaluate the heartbeat sound from the remote area. The computer can automatically analyze the uploaded sample and discover the abnormal and normal heart sounds. This system has 97% accuracy.
Researchers have used the Crow Search Optimization algorithm based on the Cascaded Long Term Memory model to diagnose disease. The research manager to achieve 96.16% in diagnosing heart disease and prove that it can be used in disease diagnosis tools for smart healthcare systems. 20
Random forest and decision tree-based hybrid scheme are used to predict heart disease. Random forest is used in feature extraction, and decision tree is used in classification. The model obtained an accuracy of 94.44%. 21
Heartbeat sounds classification
Many studies are conducted to classify heartbeat sounds using various techniques, models, and algorithms. This classification results are used to predict heart disease. For instance, Raza et al. 22 proposed a deep learning model for heartbeat classification based on data framing, down sampling, and recurrent neural network (RNN). This method can detect the heartbeat signal and give information to decide on further treatment. Furthermore, the research manages to prove that this method is more competitive and efficient.
Next, 23 proposed a method to classify Heart sounds PASCAL Challenge. Authors have used an algorithm that identified the S1, and S2 heart sound, which is s1, is lub and s2 is dub. To remove the noise in the signal, the researcher applied the decimate function of MATLAB on the original sound signal and applied a band-pass filter. After the filter, they applied the average Shannon energy used to identify the peaks of the heart sound signal easily. The authors have used an algorithm to find the minima and maxima points of the sound signal to accomplish the segmentation of heartbeat sound. Lastly, they used the J48 and MLP algorithm to train the model that predicts the sound signal.
Moving forward, 24 have proposed different novel feature extraction to detect abnormal heart sound and classify heart murmur. First and second heart sound (S1- S2EF), energy fraction of heart murmur (HMEF), the maximum energy fraction of heart sound frequency sub-band (Shema), sample entropy of heart murmur component. The heart sound is decomposed into a wavelet packet. For a classifier used to detect the abnormality of heart sound and discriminate heart murmur, the support vector machine (SVM) was used. The result was very promising and proved that the method could be used as a tool for cardiac auscultation.
Next, a system to correctly identify and classify eight different pathological heart sounds and four normal sounds is developed by Ref. 25. The authors have used modified linear predictive coding (LPC) to extract the necessary information from heart sound. This improved the distinguishable state and decreased the computational complexity of the process. The authors then used an optimized classifier algorithm that supports vector machine-modified Cuckoo Search for the classification process. In addition, the optimize SVM can reduce the feature space and select optimizer values of support vector parameters to further improve the system's performance. The overall model LPC- SVM- MCS system provided good accuracy of 95.43% and only depended on few coefficients related to the MCS search algorithm, which made no more tuning.
In Ref. 26, research has implemented convolutional neural network (CNN) to perform automatic abnormal heart sound classification. The authors have segmented the heart sounds per heartbeat. Each segment is converted to form an intensity map and classified into two methods: a simple SoftMax Regression (SMR) network and a CNN. The feature is determined automatically through training in Neural Network models. This research provides better classification accuracy than the SMR, and this classification provides better resolution in detecting abnormal heart sounds in the early stage of heart disease.
Furthermore, heart sound classification using the tensor approach was developed by Ref. 27. This research is the mixed approach for binary classification. The author has used a four-way tensor to set features for each heartbeat segment. After that, tensor representation is decomposed and compressed to find out the most discriminating parameter before the data are applied to the classifier. This research proved that this method could classify noisy PCG signals.
Adaptive neuro-fuzzy inferencing systems (ANFIS)
ANFIS is an integration system in which neural networks are applied to optimize the fuzzy inference system. ANFIS can modify these fuzzy if-then rules and membership functions to minimize the output error measure or explain the input-output relationship of the complex system. Two fuzzy if-then rules are considered28,31, as shown in Figure 1.
Rule 1: if (x is A1) and (y is B1) then (Z1 = p1x + q1y + r1), Rule 2: if (x is A2) and (y is B2) then (Z1 = p2x + q2y + r2),

Where Ai and Bi are fuzzy sets in the antecedent, pi, qi, and ri are the design parameters that are identified during training process.
The ANFIS has five layers as follows:
The first layer is called the fuzzification layer. The output of the node in this layer is given as the following equation: If Nodes decide the firing strength of a rule and the output of node i is shown in the following equation: Nodes normalize the rule firing strength and the output of node i is shown in the following equation.
ANFIS for classification and hybrid models for improving accuracy
ANFIS has been used in various fields for classification, such as heart sound classification, brain signal classification and so forth. For example, ANFIS was used for the classification approach in the power distribution system 32 . The researchers concluded that this framework manages to classify ten types of short circuits fault in distribution and can actualize high resistance fault resistance in the paper.
Furthermore, ANFIS is used to for classification to predict heart disease. 13 The proposed ANFIS model by Ref. 13 gives an average testing error of 0.01 which is very satisfying for heart disease prediction. This show that ANFIS has high accuracy, especially when compared with other studies and conclude this model is the appropriate model for classification in healthcare era specially heart disease.
ANFIS system is also used to classify brain signals into normal and abnormal. 33 The authors used a hybrid model in which ANFIS is optimized with Adam optimization algorithm (ADAM) and mini-lots of two rules layers with 20 and 5 rules for classification. The proposed model in this study 33 achieved 97% accuracy.
In medical field, successful classification is crucial. For this purpose, a hybrid approach based on the ANFIS, the fuzzy c-means clustering (FCM), and the simulated annealing (SA) algorithm was proposed in a study to classify five different cancer datasets. The datasets were related to lung cancer, nervous system cancer, and brain cancer, endometrial cancer, and prostate cancer. 34 The findings of this study 34 demonstrate that, with an average accuracy rate of 96.28% for classifying all cancer datasets, the performance of training FCM-based ANFIS using the SA algorithm becomes more successful, and the outcomes of the other techniques are good.
To enhance the power extraction capabilities of the FC-connected system, an improved ANFIS based maximum power point tracking (MPPT) approach is offered by Ref. 35. To regulate the FC output voltage as effectively as possible, the genetic algorithm (GA)-ANFIS approach is suggested in this study. 35 The suggested method's feasibility and efficacy (>98%) are confirmed by the power extraction ratings and efficiency values.
Finally, a study classified and segmented meningioma tumors using soft computing methods. 36 In order to convert the spatial pixels in the noise-smoothed brain picture into multi-resolution pixels, the noise contents are first recognized and minimized using directional filters. This multi-resolution image that has been Gabor converted also contains features that are extracted from it and improved using an ant feature learning optimization approach. In order to segment the tumor areas on this categorized abnormal meningioma brain picture, the morphological segmentation method is used after these optimal features are classified using the ANFIS classification model. The proposed meningioma tumor detection system obtains 98.1% of sensitivity, 99.75 of specificity, 99.6% of accuracy, 98.55 of precision, 97.95 of F1-Score, and 98.1% of relevance factor. 36
By reviewing the existing studies, it can be concluded that ANFIS is a suitable model for classification purposes. Furthermore, ANFIS can be optimized to achieve higher accuracy for classification in medial domain. Therefore, this study aims to propose a hybrid model to optimize ANFIS for achieving higher accuracy while classifying heartbeat sounds.
Swarm intelligence meta-heuristics
Finding the "best available" values of an objective function within a given domain (or input) is referred to as optimization. There are many different types of objective functions and domains that may be used. Traditional methods of problem-solving are time-consuming and unable to handle complex issues. Natural-inspired optimization approaches such as metaheuristic algorithms are used to address complicated issues in the real world.37,39
Swarm intelligence (SI) refers to methods to the solved problem that emerges in the interactions of the simple information-processing unit, and this concept suggests multiplicity, randomness, and messiness. 40 SI is an innovative distributed intelligent paradigm for solving an optimization problem that originally took its inspiration from biological examples by swarming, flocking, and herding phenomena invertebrates. 41
Most of the swarm intelligent based algorithms are simple and robust techniques that determine the optimum solution of optimization problems efficiently. Some of the swarm intelligence algorithms are ant colony optimizer, particle swarm optimizer, ABC algorithm, cuckoo search, and so forth. 42 PSO is used to enhance the performance of the ANFIS system in classification problems. For instance, the researchers proposed a model in which PSO is used to tune ANFIS parameters for enhancing its classification accuracy. 42
Swarm intelligence is used to address stationary optimization problems and also dynamic optimization problems; therefore, Swarm intelligence can be used to optimize the various problems. Swarm intelligence can also be integrated with ANFIS for optimization purposes. A study by Ref. 42 integrated one of the swarm intelligence techniques that are PSO with ANFIS using modified linguistic and the threshold value. This combination improves the classification accuracy compared to other methods. Nevertheless, in this part, it can be concluded that swarm intelligence can be combined with ANFIS for optimization purposes.
Artificial bee colony (ABC)
ABC is one of the members of swarm intelligence. ABC tries to model the natural behavior of real honeybees in food foraging. Honey used several mechanisms like waggle dance to optimally locate food sources and search for new ones. It was influenced by intelligent foraging behavior of honeybees. The algorithm is especially based on the model for the foraging behavior of honey bee colonies which was proposed by Tereshko and Loengarov. 43 This makes them a good candidate for developing intelligent search algorithm. 44 Figure 2 shows the ABC Framework in which the bee in a colony is divided into three groups (1) employee bee – in charge of food source, (2) onlooker bees – choose a food source to forage, and (3) Scouts – searching randomly for new food sources.

ABC framework 44 .
There are two distinct parameter groups in the ANFIS structure: premise and consequence. ANFIS training entails applying an optimization technique to determine these parameters. 45 A study by Ref. 46 introduced a new approach for training the ANFIS using ABC. In this study 46 , ABC as one of the swarm intelligent branches, is used for training. ABC is used for training the antecedent parameters and the conclusion parameters for identification of the nonlinear system. The results are compared with other methods, and ABC shows better results than genetic algorithms, backpropagation and hybrid learning. 32
Furthermore, a hybrids ant bee colony (ABC) with ANFIS is proposed by Ref. 47, which is called NF-ABC. This proposed method enhances the classification accuracy and reduces the complexity of dimensionality, redundancy, and irrelevant data.
A specific multiobjective ABC optimizer called H-MOABC is proposed by Ref. 48. Comparing the suggested approach to state-of-the-art algorithms, the proposed optimizer shows to be competitive in solving two- and three-objective optimization problems. In the experiments, two scalable real-world RNP situations are solved using H-MOABC in a hierarchical decoupling fashion. The suggested H-MOABC is particularly successful and efficient in optimizing RFID networks, according to computational findings.
Based on the results of existing studies32,46,47, ABC as one of the members of swarm intelligence, is used for optimization to enhance the accuracy. ABC is used is used for training the antecedent parameters and the conclusion parameters of ANFIS to improve the performance results. Since heart disease is still number one killer in the world49,53, the performance of prediction and classification algorithms are very sensitive and requires high accuracy. 54 Therefore, this study used ABC to optimize ANFIS for the classification of heartbeat sounds.
Comparison of existing studies
Existing studies related to classification of heartbeat sounds are compared in Table 1 in terms of accuracy. Most of the existing studies related to heartbeat sound classification used only one main technique such as neural network, support vector machine, and hidden Markov model. Most of the authors focused on improving the techniques in pre-processing the data, such as cleaning the noise, dimension diverged, and so forth. There are very few authors who concentrate on optimizing the hybrid classifier. Moreover, the classification of heartbeat sound requires high accuracy while classification using one algorithm has less accurate. It is crucial to have a more accurate heartbeat sound classification to assist the doctor in providing treatment to patients. ANFIS alone does not have good accuracy. Therefore, an optimized ANFIS is needed to enhance the accuracy to classify the heartbeat sound. Consequently, the main gap in the existing study is an optimized hybrid classification model to classify heartbeat sounds.
Comparison of existing studies.
Method
This study aims to create an optimized ANFIS model for the classification of heartbeat sound using ABC. In this section, the steps that will carry out to achieve the aim are explained as shown in Figure 3. Firstly, the data is normalized and undergo feature selection. After the feature selection, the data is separated as a training and test set. The training set is used to train the proposed model, and the test set is used for evaluation. The details of the data and data collection, the data cleaning process, the feature extraction, and the proposed classification model are discussed in the following sections.

The overall framework with training and test data for classification.
Data collection, pre-processing, cleaning, and feature extraction
The data set was gathered from two sources. The first source was taken from the general public via the Stethoscope Pro iPhone app and the second source was taken from a clinical trial in the hospital using the digital stethoscope DigiScope. The data contains heartbeat sound with lub and dub sounds, and its length varies from 1 s to 30 s. There are a total of 835 data sets. There are four categories in dataset A: (1) artifact, (2) extra systole, (3) murmur, and (4) normal heartbeat sounds. Dataset B has fewer classes and 461 samples, and it contains three classes: (1) extra systole, (2) murmur, and (3) normal heartbeat sound. These two datasets are used to verify the generalizability of classification models. Datasets A and B are combined, and four classes are presented in the dataset which is (1) murmur, (2) artifact, (3) extra systole, and (4) normal heartbeat sounds.
Data pre-processing is a crucial part of the research. In this process, raw data is transformed into well-formed data to be further used in the study. In this research, data pre-processing consists of two parts: data cleaning and feature extraction (Figure 3). The heartbeat sound is then proposed to be classified.
Data cleaning is done using python in Juypter editor. The data were denoised, down sampling, normalizing, framing, concatenating both the data, and shuffle the data. This process concludes that the dataset has four classes: murmur, normal, artifact, and extra systole.
Firstly, noise elimination is done to the heartbeat sounds. The heartbeat sound in the database does contain environmental noise and external sounds. The sound needs to be eliminated from capturing the exact sound heartbeat sound. The unwanted sound is eliminated using the noise function. The sound is denoised and makes it uniform for better feature extraction length of the sample is also filtered, and the only sample with more than 0.5 s is taken.
Next, Data Framing is carried out to the heartbeat sound. The frame rate of each file is not equal and do not apply for any classification because of the different length. The data framing is used to fix the sampling record of each file. The data framing makes classification run better and more accurately. Down sampling was also done to the audio files. Each data will have frame rates. This will make the CPU usage a lot, consume a lot of power and take a longer time to complete the task. Down sampling is used to resolve this issue. Down sampling is a signal reducing technique applied to reduce the feature of sound files. This technique will make the frame look minimized.
Lastly, the data are concatenated and shuffled. There were two data, and the dataset was already in classified mode. Therefore, the data are concatenated into one dataset and shuffle to be used for the classification. Using this technique, a better dataset was provided, and four categories were formed.
The models do not immediately understand the audio signal, and more structural function extraction is applied to them. In this study, multiple features are extracted, such as Mel frequency cepstral coefficients (MFFC), Chroma, Mel spectrogram, etc. The feature is extracted using librosa library in python. The main feature that will be extracted is MFCC.
MFCC is based on a linear transformation of log power spectrum on a nonlinear Mel frequency scale. The feature can be extracted using the MFCCs method, and the feature extracted with that method shows the time spectrum. These features are widely used for analyzing sound processing tasks. Since each heartbeat exhibits different oscillational and amplitudes, the standard deviation within each interval and the deviation of the diastolic period were used to represent the different classes. The MFCC is extracted using the python library. The best 250 datasets are used for the classifier. An example of MFCC extract is shown in Table 2.
Extracted MFCC raw data from a wav file.
Hardware and software specifications
Table 3 shows the hardware and software specifications used in this research.
Hardware and software specifications.
Experimental design of the optimized model
The experimental setup in this study consists of two training phases. In Phase 1, ANFIS without any optimization is used to train the dataset. In Phase 2, ANFIS is optimized using an ABC algorithm.
ANFIS model to classify the heartbeat sound
The flowchart and Pseudo-code of ANFIS are shown in Figure 4 and Table 4 respectively which explain the ANFIS flow where the data is load-in and then data will go through a layer of data and output the class of the sound signals.

The flowchart for ANFIS model 10 .
The pseudo-code of ANFIS.
ANFIS consists of 5 layers, as shown in Figure 5. The first layer is the fuzzification layer, where the inputted parameter has its membership functions for each input, the a-f is the parameter set and the antecedent parameter. Layer two is the rule layer. This layer represents the firing strength for each rule generated in the previous layer. The third layer is the normalization layer, which has a certain ratio and calculates the firing strength. The fourth layer is called the defuzzification layer. The output of layer three is simple, also known as the conclusion parameter. Finally, layer 5 is the sum layer where the layer comes out with all the final MFCC readings.

ANFIS model with five layers.
Design of ANFIS model optimized by artificial bee colony
Artificial bee colony
In order to optimize numerical issues, Karaboga proposed the ABC method in 2005. 60 The ABC algorithm is a swarm-based meta-heuristic algorithm. In this algorithm, there are two main types of bees: (1) Employee bees and (2) Onlooker bees. Meanwhile, the scout bee will only play a small part in this algorithm process. The data are inputted randomly at the starting point. This employee bee then goes to the data that is being inputted (food sources) and search for related Mel Frequency Cepstral Coefficient (MFCC) readings (food sources), and it will compute the amount of MFCC readings (nectar in this data) (food source). Details from employee bee are then sent to onlooker bee the nectar details and place, onlooker bee then check the MFCC readings and are determined on amounts of nectar. If the MFCC reading cannot be determined or recognized, the data is considered exhausted, and the scout bee is sent again to the search area to check new food sources.
Figure 6 shows the flow of ABC-ANFIS. As mentioned in the literature review, Swarm intelligence can be used for optimization purposes. The purpose Method in classifying the heart sound is using ANFIS optimized by ABC. The optimization is done in layers 1 and 4 in the ANFIS structure, the antecedent, and conclusion parameters. The position of a food source is the possible solution. A set of antecedent and conclusion parameters of ANFIS corresponds to a food source in the ABC algorithm. Thus, the ABC algorithm finds the best food source around the hive or the best antecedent and conclusion parameter set in the search scope.

The proposed ABC-ANFIS framework.
In ANFIS layers 1 and 4, ABC is incorporated where the parameter handling happens. The parameter initializing layer and defuzzification layer are layer 1 and 4, respectively. These two layers handle the parameter in ANFIS, which know as antecedent and conclusion parameters.
Table 5 shows how the ANFIS is optimized using ABC. The parameter of ANFIS is the main thing, and then this ABC is used to update the parameter. ANFIS has two types of parameters one on the antecedent, and the other one is the conclusion. The antecedent parameter is the membership function. The conclusion parameter tends to use the defuzzification layer of ANFIS. The ABC then plays an important role in both parameters. ABC creates food source on the antecedent part and determine the nectar amount, which is allocating each membership function as nectar then and undergoes its process until the requirement is met and then the memorize the best food source, which is the parameters. At the conclusion, all onlookers are sent to check the parameter and see whether the amount is satisfied. ABC plays its optimized role by optimizing the parameters in ANFIS and makes the system more effective.
Pseudocode of optimized ANFIS with ABC.
Figure 7 shows that ANFIS has two types of parameters that are antecedent and conclusion parameters. Antecedent Parameter is on layer one and has six parameters (A, B, C). The number of memberships is equal to the total parameter of all membership. If there are four memberships; therefore, 24 parameters are present in the antecedent parameter. In the conclusion parameter, there are also 24 parameters as there are four rules, and each rule has six conclusion parameters.

The architecture of ABC-ANFIS.
classification performance index
The error lost occurrence in the training model usually is measured by these three measurement techniques: (1) mean squared error (MSE), (2) root mean square error (RMSE), and (3) mean error and absolute precision error (STD ERROR).
The MSE of an estimator computes the average of the squares of the errors or deviations (difference between the output and target). The following formula is used for MSE:
Next, RMSE is used to measure the number of the existence of errors between the train and test, respectively. This implementation is to validate the data of the training dataset (S. M. H., S. Y., & V, 2017). The smaller the RMSE, the higher the accuracy and less error in the classifying model. The following formula is used to calculate RMSE:
Lastly, the accuracy of the test is the ability to differentiate the heartbeat sound correctly. To estimate the accuracy of a test, we should calculate the proportion of true positive and true negative in all evaluated cases.
Analysis and results
This section discusses the overall results of the proposed ANFIS optimized by ABC for the heartbeat sound classification. In the first section, experimental and simulation results are discussed. Next, the comparison between the ANFIS and ABC-ANFIS is mentioned.
Experimental and simulation results
The experimental result was attained to assess the performance of ANFIS and the optimized ABC-ANFIS. The assessment includes the parameters benchmark (MSE, RMSE, error mean, and standard deviation) measurement and the execution time and training model to classify the heartbeat sound. The dataset is split into two sets, one for training and another one for testing purposes. 70% of the data set are used for training and only 30% is used for testing purpose. Both datasets are input into ANFIS and ABC-ANFIS to get the validation.
Table 6 explains the Parameter setting for both ANFIS and ABC-ANFIS. The parameters set up used for ANFIS are error goal, decrease rate, the initial step, increate rate, maximum epochs, while for ABC-ANFIS are food source, onlooker bee, and employee bee. The parameter setting plays an important role in optimizing ANFIS. Each onlooker bee estimates the amount of nectar it received from its food source with some errors. Each onlooker bee will choose a food source based on how much nectar they think the food source is producing. The likelihood that an onlooker bee will pick the nectar increases with its elevation. Therefore, ABC controls the parameters. The control parameters of ABC are as follows:
The number of colony size (employed bees and onlooker bees) is the dataset size. The number of food sources equals the half of the colony size. The employee bee leaves out the dataset that has no improvement in 100 trials. The stopping criteria, which is also the cycle of foraging, is 1000.
ANFIS and ABC-ANFIS algorithm's parameters settings.
The optimization problem for all models is based on the following equation:
ANFIS result in heartbeat sound classification
This section includes the RSME and SD of both the testing and training model of the ANFIS and ABC-ANFIC.
Root mean square error
Root Mean Square is used as a standard statistical metric to measure model performance 61 . The lower the RSME, the better performance results are obtained. Table 7 shows that RSME for most of the classes is low. RSME shows how good the fitness is, and above all, this model has good fitness. In the training set, normal class score is 0.122, the murmur class score is 0.126, the extrasystole class score is 0.116, and the artifact class score is 0.129. In the training set, extrasystole has the lowest value. In the test set, the normal class score is 0.13. The murmur class score is 0.136, the extrasystole score is 0.12, and the artifact class score is 0.131. The lowest score in the test set is also the extrasystole. The test set has higher reading for all classes compared to training. The higher score is the murmur class in both sets and the lowest in the extrasystole class. This indicates the ANFIS model has a better capacity to classify the extrasystole class; meanwhile, this class was also nearer to 0-point, indicating that ANFIS manages to classify most of the class closer to the actual value.
RSME reading for all classes for both training and test.
The RSME of ABC-ANFIS is shown in Table 7, the normal class has a score of 0.148661, the murmur class score is 0.1483224, the ABC-ANFIS score for extrasystole is 0.149666295, and the artifact class score is 0.15. In the test set, the normal class has a score of 0.15, and the murmur class has a score of 0.148997. The extrasystole has a score of 0.15, and the artifact class has a score of 0.150665.
The murmur class has lower reading in both training and test set. The lower the RSME, the better it is. Table 7 shows that most of the RSME are also lower. RSME shows how good the fitness is, and above data, this model has good fitness. When comparing Tables 8 and 9, the ABC-ANFIS has a lower overall reading for all classes than the ANFIS.
Standard deviation for different algorithms.
The standard deviation for ANFIS and both test and training.
Standard deviation
The standard deviation focuses on whether data is clustered around the mean, and the nearer the data to 0, the closer the data to the mean. As shown in the training set included in Table 9, the normal class score is 0.349285, the murmur class score is 0.354965, the extrasystole class score is 0.340587727, and the artifact class score is 0.359166. The lowest value for the standard deviation in the training set is the extrasystole class. In the test set, the normal class score is 0.360555, the murmur class score is 0.368782, the extrasystole class is 0.34641, and the artifact class score is 0.361939. The lowest reading in the training set is extrasystole. In both test and training set in Table 9, the extrasystole is the lowest In this ANFIS model, all the classes are nearer to the mean, and the extrasystole is nearest to the mean.
The standard deviation of ABC-ANFIS is discussed in this part. Table 9 shows that in the training set, the standard deviation in the normal class is 0.14661, in the murmur class is 0.138324, the extrasystole class is 0.13966, and the artifact class is 0.14. The lowest in the training set is murmur. In the test set, the normal class scores 0.149, the murmur test scores 0.147997, the extrasystole class is 0.148, and the artifact class score is 0.148665. In the testing set, the lowest is murmur as well. Overall test set and training set have lower reading in murmur class compared to other classes. The standard deviation focuses on whether data is clustered around the mean, and the nearer the data to 0, the closer is the data to the mean.
Accuracy
It is the closeness of a measured value to a standard or known value (Accuracy and Precision, n.d.). In Table 10, the accuracy for class normal is 85%, the murmur is 84%, the extrasystole % is 85, and artifact class is 83%. The mean average accuracy for all classes is 84.25%. This shows that the correct classification for the ANFIS model achieved an overall 84.25%. The ANFIS manages to classify the four classes with 84.25% accuracy.
Accuracy of ANFIS.
The accuracy of ABC-ANFIS is discussed. As shown in Table 10, the accuracy of the normal class is 92%, the murmur class is 93% and extrasystole is 92%, and artifact class is 91%. The overall average accuracy for all four classes was 92%. This shows that the ABC-ANFIS model can classify the heartbeat sound with 92% accuracy.
Comparison of classification result
In this section, the result is compared among ANFIS, optimized ANFIS, and other classifiers such as SVM, LSTM, and KNN algorithm. First, this study implements the existing classifiers such as SVM, LSTM, KNN, and optimized ANFIS-PSO to classify heartbeat sounds into normal, murmur, extrasystole, and artifact. The results were reported based on RMSE and accuracy. Then, this study focused on proposing and implementing ABC-ANFIS. Finally, the results of the proposed ABC-ANFIS are compared with SVM, LSTM, KNN, and ANFIS-PSO.
Root mean squared error
In this section, the RSME of all classification models is discussed. In Table 11, the reading of both training and test set is shown. The training set for murmur class is 0.23237 in PSO ANFIS, 0.447214 in the LSTM, 0.489898 in the SVM, and 0.5 in KNN.
RSME reading for all classifiers for training and data sets.
While in the test set, the murmur is 0.244 for PSO ANFIS, 0.43589 for LSTM, 0.529 in SVM, and 0.556776 in KNN. The overall reading shows that ABC-ANFIS has lower reading for both test and training set.
The RSME also shows that ABC-ANFIS has lower reading and LSTM has higher reading (Figure 8). The reading in LSTM is higher in both training in test data and also in all classes. The ABC-ANFIS has the lowest in both test and training, and all classes.

The comparison of RSME for different algorithms.
Standard deviation
In this section, standard deviation of all models is discussed. Table 8 exhibits the reading of both test and training set for all classes. In the training set, the murmur class, the standard deviation for PSO-ANFIS is 0.222379, 0.437214 for LSTM, 0479898 for SVM, and 0.49 for KNN. While in the test set, the murmur class reading is 0.243849 for ANFIS PSO, LSTM is 0.43489, SVM is 0.52815, and KNN is 0.555776. Overall, the ABC-ANFIS has the lowest value for both training and test.
The RSME also shows that ABC-ANFIS has lower reading and LSTM has higher reading. The ABC-ANFIS is the smallest value for all the classes (Figure 9).

The comparison of standard deviation for different algorithms.
Accuracy
In this section, the accuracy of all models is compared. Table 12 shows the accuracy of the reading of all the classification models. The normal class's accuracy is that ANFIS has 85%, ABC-ANFIS has 92%, ANFIS + PSO is 89%, LSTM is 79%, SVM% is 65, and KNN is 75%. The murmur class has 84% in ANFIS, 93% in ABC-ANFIS, 88% in ANFIS-PSO, 79% in LSTM, 65% in SVM, 77% in KNN, and 79% in extrasystole. The ABC-ANFIS has higher accuracy for all classes than other classifiers.
The accuracy of all classes for different algorithms.
Figure 10 shows that the ABC-ANFIS has higher accuracy, indicating that the ABC-ANFIS model is a more accurate and better classifier. ABC has optimized the ANFIS to be a better classifier for heartbeat sound.

The comparison of accuracy for different classifiers.
Comparing the models
In this section, the main class which is related to murmur is taken to discuss the accuracy. Murmur class is selected for discussion as a murmur sound classification is of utmost importance to detect cardiovascular disease and help in early treatment. As shown in Table 13, ABC-ANFIS has the highest accuracy for murmur class.
The accuracy of murmur class for different algorithms.
The comparison of related works with this study.
In Figure 11, the ABC-ANFIS is shown to have higher accuracy than other models. ABC optimization plays a role in higher accuracy. The ABC-ANFIS also shows performing better than the ANFIS-PSO. This show ABC has more effect on optimizing ANFIS.

The comparison of accuracy for the murmur class using different algorithms.
Comparing with related works
In this section, this research and related works are compared. The selected related works are those studies that focuses on heartbeat sound classification. Table 14 shows the comparison of the existing research and the proposed classifier. Khan et al. 21 used LSTM as a classifier and concluded the accuracy of 91.39%, Al-Naami et al. 59 used ANFIS which managed to achieve 89% accuracy, Nogueira et al. 55 used SVM, in which the accuracy is 82.33%, Li et al. 57 used CNN with 86.90% accuracy. Sharma et al. 56 have also done research using the same dataset that is used in this research. They have achieved an average accuracy of 81.38%. Finally, this research uses ABC-ANFIS and obtains 93.00% accuracy which is sligtly better but very close to the results of the study done by Khan et al. 21 Figure 12 shows five related works that are compared. One of the related studies used the same dataset as this research; however, the other four used different datasets. In Sharma et al., 56 the authors have researched multiple datasets, and one of the data sets is heartbeat sound in wave form as this research. However, the authors have not shuffled both datasets. They have used it separately. They have also converted the whole audio file into the spectrogram and make it more like image classification. The research also mainly emphasized on heart disease detection and managed to get an average accuracy of 93% for murmur class.

The comparison of the proposed ABC-ANFIS with existing studies.
Next, the other four related works mainly use the PCG signals dataset. This is because PCG Signal requires less preprocessing than audio files and the signal classification involves time and domains. Most of the research focuses on signal classification; meanwhile, this research focuses on the heart sounds in another term in the audio classification. This is because auscultation is hearing e dataset consist o heartbeat sounds. This research aims to assist in detecting the abnormalities in the heartbeat sound and classifying heartbeat sounds.
In Khan et al., 21 the authors have used 3126 PCG signals labeled with normal and abnormal sounds within the cardiac cycle by the experts. Then PCG signal was feature extracted into the time and frequency domain by the experts as well. The authors mainly segmented the PCG signals and separated the given dataset into training and test set. They ran into the classifier LSTM and managed to get an accuracy of 91.39%.
Next, in a study done by Al-Naami et al., 59 , the authors have taken a dataset from an international dataset from PhysioNet-Challenge 2016. The authors have accepted the challenge; therefore, they needed to use the provided dataset. The dataset contains 3000 heart sound recordings. The dataset consists of class A, B, C, D, and E and the time duration of the recording is 120 s, and each signal sampled is 2000 Hz. The authors have then used the discrete Fourier Transform to preprocess the signal and then run it in the ANFIS classifier.
Moving forward, in Ref. 55, the authors have also used a challenge database named Physionet/Computing in Cardiology Challenge. The database provides the training set consists of both EGG and PCG signals. The authors have used 120 PCG signals and 400 ECG signals for their research. The authors then did feature extraction and ran the heart sound image classification using the SVM classifier.
Sharma et al. 56 have used the same dataset as the present research. The authors have done some data cleaning and convert the wav file into the spectrogram and made it as heartbeat sound image classification using CNN classifier.
Lastly, Li et al. 57 have also used a dataset from PhysioNet/Computing in Cardiology Challenge. The authors have used all the PCG data provided in the challenge of 3153 PCG with six subsets. The authors then filtered the PCG recording by a high-pass filter with a cut-of-frequency and spike removal algorithm. The authors also did feature extraction and ran the PCG signal into the CNN classifier.
Discussion and conclusion
This study aims to develop an improved and optimized ANFIS classification method. An ABC is used for optimizing ANFIS to enhance the accuracy. This proposed a novel ABC-ANFIS framework that focuses on improving the accuracy of ANFIS for the classification of heartbeat sound. This study classified heartbeat sounds into four categories (1) normal, (2) Murmur, (3) extrasytole, and (4) artifact, as opposed to two categories of normal and abnormal in other studies. In addition, additional standalone and improved algorithms are used in this study to classify heartbeat sounds, including SVM, LSTM, KNN, ANFIS, and ANFIS optimized by PSO. Finally, SVM, LSTM, KNN, ANFIS, and ANFIS-PSO results are compared to those of the proposed ABC-ANFIS.
The proposed model using ABC-ANFIS for heartbeat sound classification provides almost 93% of accuracy. The obtained results are presented using four metrics MSE, RSME, standard deviation, and accuracy. ABC-ANFIS shows a significantly improved performance in compared to all four measures compare to other models and related works. This improvement suggests the significance of ABC-ANFIS for a better classification tool for heartbeat sounds. This is due to ABC-ANFIS's ability to function as an optimizing parameter, neural network, and fuzzy system. Besides optimizing the parameter in layer 1, the ANFIS's layers 2, 3, 4 have easier classification. At layer 5, where the decision layer is also optimized to make the decision, this makes the heartbeat sound MFCC classified accordingly to its class with more accuracy. This is an important finding for the heart sound classification for all four classes.
The MSE reading of ABC-ANFIS shows the best among all. This model achieves the lowest among all models. MSE is the average of square the difference between the actual and estimated value and also evaluates the model's error. The lower the error, the better the model fitness is. This is because the ABC algorithm has optimized the parameter at the starting and ending parts of ANFIS. This makes fewer errors in classification, and therefore, the model has good fitness.
The RSME reading of ABC-ANFIS outperforms all the models. The RMSE is used to evaluate trained models for usefulness or accuracy. This is because the ABC algorithm has already optimized the inputted parameter. The employee bee already checked for the source, which MF is accurate and set the information to the onlooker bee. Then it can be understood how to look for MFCC amounts for specific classes and how to become nectar, which is MFCC collection for the heartbeat sound.
Therefore, this lessens the burden on the ANFIS in layer 2, layer 3, and layer 4. At the last layer, the ABC algorithm also optimizes the half classified MFCC again in the middle layer and then provides the classes to which the MFCC belongs. Hence, the model is useful and provides it accuracy as it undergoes optimization.
Next, in this paper, accuracy is also used as one of the evaluating metrics. ABC-ANFIS manages to score 93% accuracy in classifying the murmur class, making this one of the biggest contributions of the research. This is due to the amount of murmur dataset classified by the model to the actual value being high. The onlooker bee plays an important role in keeping the nectar amount as it will collect the required amount using details given by the employee bee, making the conclusion parameter optimized and increasing the accuracy of the model.
The model is also compared to other related works. The related works aim to classify the heartbeat sound yet using other feature extraction and other classifiers. ABC-ANFIS manages to score the highest among them and shows that this hybrid classifier can provide better accuracy. This is also one of the main contributions of the research. The ABC-ANFIS can be used in heart sound classification and provide better classification than other feature extraction and classifier. Besides, the research also proves that optimizing parameters in ANFIS classifier will provide a good fit model, less error model, and more accurate results.
This research focuses on the classification of heartbeat sounds by selecting the best algorithm based on subjective measurement parameters. Thus, this study aims to propose a model for the classification of the heartbeat sound using the ANFIS. Furthermore, an optimized ANFIS with ABC algorithm for the classification of heartbeat sound is developed and managed to provide better accuracy. The overall objective is achieved as ABC-ANFIS has better performance and proves that it has managed to optimize the ANFIS.
In this current world, cardiovascular disease has become more prominent, and more people are dying due to this disease. This disease can be cured if it is detected earlier. The disease can be detected using the heartbeat sound. The sound of the heart consists of two-part lub and dub, the abnormal between these two sounds indicated there is some pathological disease. The heart sound is determined using a stethoscope. The method is known as auscultation. However, there is proof that current doctors are less efficient in determining the heart sounds as they are more dependent on clinical results. The clinical result is only taken during any huge symptoms, and this might be late. Therefore, a heartbeat sound classification is of utmost importance to detect the disease.
Heartbeat classification is essential to detect cardiovascular disease at an early stage. There is a need to have new soft computing technologies that can help classify heart sounds for better heart disease prediction. There are various techniques to classify the heartbeat sound. A lot of research has used a variety of classifier models to classify this heartbeat sound.
ABC-ANFIS is a good classifier especially for heartbeat sounds. In ABC-ANFIS, optimizing the antecedent parameter and conclusion parameter increases accuracy contrary to ANFIS. Its accuracy is lower when the parameters are not optimized. The evaluation metric also shows the ABC-ANFIS is good in classifying and shows better accuracy. Optimizing ANFIS using ABC gives an accuracy of 93% for the murmur class.
Numerous future studies can be conducted based on the findings of the research. For instance, more experiments and research can be done to compare different algorithms to show best algorithm to optimized ANFIS model. Furthermore, other classifiers can be experimented to contribute to heartbeat sound classification. Other methods for feature extractions can be utilized.
Footnotes
Acknowledgements
The authors are thankful to the School of Computer Sciences, and Division of Research & Innovation, Universiti Sains Malaysia (USM) for supporting this study from the Short-Term Grant (304/PKOMP/6315435) granted to Dr Pantea Keikhosrokiani.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
This work was supported by Short-Term Grant (304/PKOMP/6315435). In addition, this paper is supported by Division of Research & Innovation, and School of Computer Sciences, Universiti Sains Malaysia.
