Detection of Respiratory Abnormalities Using Artificial Neural Networks

: Problem Statement: Lung disease is a major threat to the human health regarding the industrial life, air pollution, smoking, and infections. Lung function tests are often performed using spirometry. Approach: The present study aims at detecting obstructive and restrictive pulmonary abnormalities. Lung function tests are often performed using spirometry. In this study, the data were obtained from 250 volunteers with standard recording protocol in order to detect and classify pulmonary diseases into normal, obstructive and restrictive. Firstly, spirometric data was statistically analyzed concerning its significance for neural networks. Then, such parameters were presented as input to MLP and recurrent networks. Results: These two networks detected normal and abnormal disorders as well as obstructive and restrictive patterns, respectively. Moreover, the output data was confirmed by measuring accuracy and sensitivity. Conclusion: The results show that the proposed method could be useful for detecting the function of respiratory system.


INTRODUCTION
Nowadays, lung diseases are one of the most serious threats to the human health. Some phenomenon such as air pollution various infections, and smoking habit have recently increased its risk factors drastically. Lung function tests are ordered by physicians mostly in order to: • To evaluate symptoms and signs of lung disease (e.g., cough, dyspnea, cyanosis, wheezing, hyperinflation, hypoxemia, hypercapnia) • To assess the progression of lung diseases • To monitor the effectiveness of therapy • To evaluate preoperative patients in selected situations • To screen people at risk of pulmonary diseases such as smokers or people with occupational exposure to toxic substances in occupational surveys.
• To monitor for the potentially toxic effects of certain drugs or chemicals (e.g., amiodarone, beryllium) [1,2] Lung function tests are often performed using spirometry. Spirometry is the measurement of the air moving in and out of the lungs during various respiratory maneuvers. It allows one to determine how much air can be inhaled and exhaled, and how fast [1,3] .
Accurate measurement of respiratory function is necessary to assess and manage different pulmonary abnormalities [2,4] . The following parameters are measured using spirometer: Vital Capacity (VC), Forced Vital Capacity (FVC), Forced Expiratory Volume at 1st second (FEV1), ratio of FEV1 to FVC (FEV1%), Peak Expiratory Flow (PEF) and Forced Expiratory Flow 25-75% (FEF 25-75) [3] . In the present study, the ratio of FEV1 to VC was computed too. Spirometry depends on such factors as age, height, weight, and gender of subjects [1,3,5] . The complexity of outputs of spirometer and the close relationship between respiratory patterns (obstructive, restrictive, and normal) necessitates the use of intelligent systems in the interpretation of the test results.
Restrictive lung diseases are characterized by reduced lung volume, either because of an alteration in lung parenchyma or because of a disease of the pleura, chest wall, or neuromuscular apparatus. In physiological terms, restrictive lung diseases are characterized by reduced Total Lung Capacity (TLC), vital capacity, or resting lung volume [4,6] . The obstructive condition is characterized by progressive airflow obstruction of the peripheral airways, associated with lung inflammation, emphysema and mucus hyper secretion. Cessation of cigarette smoking is accompanied by a reduction in decline in lung function and is one of the most important aspects of obstructive management [7] . Systemic effects of obstructive disease include weight loss, nutritional abnormalities, musculoskeletal dysfunction and osteoporosis each of which contributes to the symptoms, morbidity, and probably the mortality of Chronic Obstructive Pulmonary Disease (COPD) [5][6][7][8] .
Restrictive and obstructive patterns have four different levels:  The biological neural network (i.e. the brain) is the original inspiration for artificial neural networks. In human nervous system, learning occurs by changing the effectiveness of the synapses. Just like the brain, an artificial neural network can be trained using samples. ANNs have the ability of processing inputs to obtain an output; if the given response does not yield the desired result, then the neuron's weights are corrected during the learning or training process. This correction generally occurs by sequentially applying input values to the ANN while making weight adjustments until a minimal error is achieved [7,9] .
The feed forward neural network was the first and arguably simplest type of artificial neural network devised. In this network, the information moves in only one direction, forward, from the input nodes, through the hidden nodes (if any) and to the output nodes. There are no cycles or loops in the network. Multilayer Perceptron Neural Networks (MLPNNs), shown in Fig.  2, constitute one of the most popular feed forward neural networks [10] .
MLPNNs have features such as the ability to learn and generalize, smaller training set requirements, fast operation, ease of implementation and therefore are the most commonly used neural network architectures [8,11] .
Contrary to feed forward networks, Recurrent Neural networks (RNs) are models with bi-directional data flow. While a feed forward network propagates data linearly from input to output, RNs also propagate data from later processing stages to earlier stages. In this study, a recurrent network called Elman was used. Elman neural network has a backward connection between the hidden and context layers. This feedback path allows it to learn temporal and spatial patterns of input data. Thus Elman neural network has certain dynamic characteristics over the feed forward neural network. On the other hand, the memory nodes and feedback connections increase its computational complexity [12] .
In 2007, Mahesh Veezhinathan and Swaminathan Ramakrishnan carried out a study to detect obstructive respiratory abnormalities using Radial Basis Function artificial networks in which the results showed that the proposed method is useful for classifying the pulmonary functions into normal and obstructive conditions [13] .
After a while and in a more recent study, they developed another research for the classification and detection of restrictive respiratory abnormalities by means of artificial neural networks. In this study, it was revealed that artificial neural networks could be used for the detection of normal and restrictive patterns of pulmonary diseases [14] .
The above-mentioned studies were carried out focusing on two out of three patterns of respiratory abnormalities; however, in this study all three patterns of respiratory abnormalities are taken into consideration.
Since combined neural network models often result in a prediction accuracy that is higher than that of the individual models, the present article aims at detecting mild restrictive, mild obstructive and normal patterns of respiratory abnormalities by means of a combined set of neural networks as well as the data gathered from spirometer. Mild levels of obstructive and restrictive patterns of pulmonary diseases are almost similar to normal patterns; hence, their early diagnosis is of importance since early diagnosis of mild respiratory diseases by means of neural networks may prevent the spread of pulmonary diseases to a critical phase thus may be of utmost importance in medical contexts.

MATERIALS AND METHODS
For the present study, 250 (134 normal, 40 mild restrictive and 76 mild obstructive) adult volunteers were considered. The portable Micro lab spirometer was used for the pulmonary function test and standard digital volume transducer was used for data collection. These transducers have already been used for precise flow-volume measurements with high accuracy and stability [15] . The acceptability and reproducibility criteria were adopted as per the recommendations given by American Thoracic Society (ATS ) [11,16] . Spirometric data on Vital Capacity (VC), Forced Capacity (FVC), Forced Expiratory Volume in 1st second (FEV1), ratio of FEV1 to FVC (FEV1%), ratio of FEV1 to VC and Peak Expiratory Flow (PEF) were collected.
Neuro Solutions 5 and SPSS 11.5 were used concerning ANNs measurements and statistical analysis, respectively.

RESAULTS
Step Wise Discriminant Analysis was used in order to identify the significance of the selected data for neural networks. Then, the most significant data were given to the networks (Table 1). Table 2 represents the accuracy of the statistical procedure used in this study.
Artificial neural networks are appropriate alternatives to standard statistical methods [12,17] . Therefore, they were used in this study in order to yield more reliable and accurate results.
More accurate results emerge by using more than one neural network. In other words, when a problem is investigated by means of a number of neural networks, the final result is more reliable and suffers less error since malfunctioning of a network may be compensated by other networks and also each network receives inputs different from that of others and thus may yield more accurate results [10,13,14,15,17,19] .
Data were divided into two groups (train and test) randomly. In order to train a neural network model appropriately, the samples must be selected carefully in order to represent the whole subjects under investigation. In this study, 200 samples were used to train the network and another 50 samples were used to test it. Furthermore, making an informed decision on  The number of neurons in input layer is equal to the number of variables in network input. Since this study aimed at classifying the volunteers into two groups, one neuron was used in output layer and two different codes were obtained (normal and abnormal as well as obstructive and restrictive patterns). Another Table 2: Classification of results of step wise discriminate analysis  Predicted group membership  Total  Percent of accurate classification  --------------------------------------------------------------------------------------------------------------Mild restrictive  Mild obstructive  Normal  Mild restrictive  34  2  4  40  85%  Mild obstructive  3  69  4  76  91%  Normal  7  6  121  134  90% issue was the number of neurons used in hidden layers. Although experimental rules may determine the number of neurons needed in these layers, the best approach is that of trial and error [15,20] . The next point to be taken into consideration is the fact that neural networks should be trained using appropriate number of training cycles; otherwise, it may result in underestimation or overestimation [21,16] .

DISCUSSION
In the present study, 11 inputs were given to the neural networks. As shown in Fig. 3, two neural networks, i.e. a multilayer perceptron (ANN1) and an Elman network (ANN2) were used. The former aimed at distinguishing between normal and abnormal subjects. It had three hidden layers. Table 3 shows the results of ANN1.
The results obtained from ANN1 (volunteers with respiratory abnormalities) were given as input to an Elman network (27 inputs marked as *) with 2 hidden layers. This network classified and distinguished between mild obstructive and mild restrictive patterns. Table 4 shows the outputs of Elman network.
The developed tests were evaluated by computing four evaluation indices [17,18] such as accuracy, sensitivity, specificity, and adjusted accuracy which are commonly used for validating medical and clinical tests [17,18] .   The event that classifies a normal data as an abnormal one is termed as False Positive (FP), whereas, the event that classifies an abnormal data as normal is termed False Negative (FN). True Positive (TP) and True Negative (TN) are those events that classify normal data as normal and abnormal data as abnormal respectively. Reported mild restrictive and mild obstructive patterns of ANN2 were evaluated by these indices too. The values of these indices were calculated using the following relations: Sencitivity Specificity Adjusted Accuracy 2 The results obtained from ANNs were evaluated by above relations and are presented in Table 5.

CONCLUSION
Lung function analysis plays an important role in the diagnosis and prognosis of respiratory disorders and spirometric investigation remains central in such clinical practices [22,17] .
In this study, abnormalities of respiratory system have been detected using artificial neural networks which are appropriate alternatives to standard statistical methods [12,23]. The study of results obtained from two ANNs revealed that a synthetic network is more accurate in detecting patterns than statistical methods (Step Wise DiscriminantAnalysis), as shown in Table 5 in comparison to Table 2 illustrating the results obtained from synthetic neural networks and statistical methods respectively. In other words, the diagnosis of respiratory disorders could be carried out more accurately using two ANNs (a three-layer Perceptron and an Elman network) in which the former fulfills part of diagnosis and gives the results as input to the latter.
The proposed method can be used for automatic analyses in medical contexts. In addition, an automatic analysis based on algorithm using neural networks with more input parameters may be useful for accurate diagnosis of such disorders.