rss
J Am Med Inform Assoc 20:e111-e117 doi:10.1136/amiajnl-2012-001171
  • Research and applications

Computer-aided diagnosis of pneumonia in patients with chronic obstructive pulmonary disease

  1. Sonia Astorga Moreno2
  1. 1Biomedical Engineering and Telemedicine Laboratory, Escuela Superior de Ingeniería, University of Cádiz, Cádiz, Spain
  2. 2Pulmonology and Allergy Unit, Puerta del Mar University Hospital, Cádiz, Spain
  1. Correspondence to Professor Daniel Sánchez Morillo, Dpto. de Ingeniería de Sistemas y Automática, Universidad de Cádiz—Escuela Superior de Ingeniería, Cádiz CP 11003, Spain; daniel.morillo{at}uca.es
  • Received 19 June 2012
  • Revised 16 January 2012
  • Accepted 17 January 2013
  • Published Online First 8 February 2013

Abstract

Background Early diagnosis of pneumonia and discrimination between this disease and chronic obstructive pulmonary disease (COPD) exacerbations in patients with COPD are crucial for optimal clinical management and treatment.

Objectives To examine the use of computerized analysis of respiratory sounds, a hybrid system based on principal component analysis (PCA) and probabilistic neural networks (PNNs), to aid the detection of coexisting pneumonia in patients with COPD.

Methods and materials A convenience sample of 58 patients with COPD (25 patients hospitalized for community-acquired pneumonia and 33 owing to acute exacerbation of COPD) was studied. Auscultations were performed by the patients themselves on their suprasternal notch. Short-time Fourier transform analysis was used to extract features from the recorded respiratory sounds, PCA was selected for dimensionality reduction and a PNN was trained as classifier. 10-Fold cross-validation and receiver operating characteristic curve analysis were used to estimate the system performance.

Results Based on the cross-validation results, a sensitivity and a specificity of 72% and 81.8%, respectively, were achieved in validation data. The operating point was selected to maximize the specificity and sensitivity pair in the training set.

Discussion The results strongly suggest that electronic self-auscultation at a single location (suprasternal notch) can support diagnosis of pneumonia in patients with COPD.

Conclusions A simple, cost-effective method has been proposed to aid decision-making in areas with no radiological facilities available and in resource-constrained settings, and could have a great diagnostic impact on telemedicine applications.

Introduction

Auscultation is a worthwhile tool for detection of a patient's respiratory pathology and is widely used in clinical practice. With the advent of modern advances in electronic stethoscopes and computerized lung sounds analysis, the potential of such technology for improved diagnosis of some respiratory diseases has become apparent. Chronic obstructive pulmonary disease (COPD) and community-acquired pneumonia (CAP) are among these pathological conditions.

COPD is an important cause of morbidity, mortality, and healthcare costs worldwide,1–3 whereas acute exacerbation (AECOPD) is the main reason for hospitalization of patients with COPD. AECOPD is a major event in the natural disease course characterized by a worsening of respiratory symptoms. AECOPD is associated with significant mortality, adversely affects a patient's quality of life, and is a huge socioeconomic burden.4

CAP is one of the most common infectious diseases and has a broad spectrum of severity. Pneumonia is the leading cause of death from infection in the USA.5 There is no ‘gold standard’ for the detection of pneumonia. Its most typical clinical findings include abnormal sounds in the chest (crackles) and augmented respiratory frequency. Chest radiography, when available, is usually done to confirm diagnosis. An increase of C-reactive protein may be an aid to the diagnosis.6 However, the role played by C-reactive protein in diagnosis is less significant than that of clinical findings.

The most common comorbidity among patients with high-severity CAP (aged >60) who require hospitalization is COPD.7 ,8 One study has shown that patients with COPD and CAP had a significantly higher 30-day death rate than patients without COPD, and that COPD was an independent risk factor for mortality in patients with CAP.9 In the same way, inpatient mortality from CAP in patients with COPD was 11% higher than for patients with non-pneumonic COPD exacerbation.10

Efforts should be therefore focused on discriminating between COPD exacerbations and pneumonia and on early treatment of pneumonia. Some authors have found that early antibiotic treatment for pneumonia (<4 h) in older people can reduce mortality and length of hospital stay.11 Although there is some controversy on this topic, current guidelines accept the relevance of antibiotic timing in patients at a higher risk of death.12

It is widely accepted that a change in the characteristics of normal respiratory sounds or the presence of adventitious sounds reflects a pathological condition of the lungs. Different types of adventitious sounds, which differ in their acoustic features such as pitch, amplitude, duration, among other features, commonly occur in several diseases. Although respiratory sounds are reported by patient's self-assessment in 35% of AECOPD,13 little attention has been given to such a sign. The course of exacerbations is characterized by increasing airway obstruction and bronchial mucus production.14 Respiratory sounds such as wheezes and rhonchi are a manifestation of airway narrowing and mucus secretion, respectively,15 and are the pathophysiological hallmarks of AECOPD. Crackles are adventitious explosive and discontinuous sounds with frequencies in the spectrum of 200–2000 Hz16 that generally appear during the inspiratory phase and usually reflect a pathological process in pulmonary tissue or airways.17

Diminished breath sounds and crackles have been traditionally associated with pneumonia, although little is known about quantification of the relation between lung sounds alterations and CAP, especially in patients with COPD. To overcome this situation, many acoustic studies have examined recognition or automatic analysis of respiratory sounds.18 Some authors have applied recognition methods to differentiate automatically between normal and pathological respiratory sounds. Researchers have designed methods for automatic detection of wheezes19–21 and crackles22–24 and even for distinguishing between different types of adventitious sounds.25–27 Abnormal respiratory sounds have been also correlated with some high-resolution CT lung findings.28

Efforts have therefore focused on the improvement of automatic detection systems for certain adventitious sounds, to provide rates directly related to the degree of airway obstruction or severity of certain respiratory disorders. The weak points of this strategy become more apparent in the case of AECOPD. Lung sounds show interpersonal variations. The absence of wheezes in some patients with significant airway obstruction is well known, as well as the presence of adventitious sounds even in the stable phase in patients with COPD.29 Additionally, crackles are not always present in CAP. A prospective study reported that 84% of patients diagnosed with pneumonia presented auscultation abnormalities, and crackles were detected in only 20.6% patients.30

Methods based on the automatic classification of sounds have not been generally adopted in clinical practice guidelines for diagnosis of pneumonia in patients with COPD. Even though the potential of electronic auscultation for improving detection of pneumonia has been clearly stated,31 ,32 new approaches need to be explored.

The diagnosis of pneumonia with the support of expert systems has been generally reported over the past few years.33 ,34 The use of neural networks for predicting CAP among patients with respiratory complaints has been also proposed,35 as well as screening methods using chest radiography.36 These strategies are based on clinical prediction rules and findings that include patient history, blood test, radiography, and physical examination.

In this paper a new discrimination method to detect CAP in patients with COPD using computerized analysis of respiratory sounds is proposed. Short-time Fourier transform (STFT) analysis is used for features extraction, principal component analysis (PCA) for dimensionality reduction, and a probabilistic neural network (PNN) as classifier. The system provides a decision-making support tool to help to discriminate between CAP and AECOPD in patients with COPD.

Materials and methods

Subjects and sound recordings

The population under study consisted of patients referred to the University Hospital Puerta del Mar in Cádiz (Spain) because of an increase in respiratory symptoms and a history of COPD. A convenience sample of 58 patients (53 men, five women) was studied. No age limit was applied for patient enrollment. Inclusion criteria were (a) patients with previous COPD diagnosis and FEV1/FVC (forced expiratory volume in one second/forced vital capacity) ratio <0.7 in a stable phase of the disease; (b) with cognitive and motor ability to actively participate in the study. The local research ethics committee approved the study and all patients provided informed consent before enrollment.

Demographic and clinical data of the participants were collected from the patient history or by personal interview. Clinical diagnosis of AECOPD was made when the patient presented with acute worsening of dyspnea, cough, or sputum production, beyond normal day-to-day variation sufficient to warrant a change in management. If chest radiograph shadowing, consistent with infection, was detected, the patient was considered to have CAP. To support the latest diagnosis, blood culture and sputum for culture tests were obtained on hospital admission.12 Two senior specialists studied each case and classified each patient.

Respiratory sounds were recorded by the patients themselves at presentation, after their stay in the emergency unit. A tailored portable sensor was used (figure 1). The device consisted of an electret microphone with coupling chamber and had a flat response between 50 and 18 000 Hz. Electronics were embedded in a housing specially designed for elderly patients that minimized movement artifacts. The sensor was placed over the trachea, on the sternal notch, as a close relation between airflow and tracheal respiratory sounds spectrum has been reported.37 ,38 The spectral pattern of tracheal sounds has been shown to be stable with low variability between subjects.39 Previous studies have pointed out that lung tissues absorb high-frequency components, and therefore the trachea might be the preferred location for obtaining additional information.40 Additionally, the trachea offers, in comparison with the thorax, a better surface for accessibility and reduction of noise interference caused by hair and clothes.

Figure 1

Details of the tailored sensor device. Air-coupled conical chamber, membrane and microphone are shown. A second microphone is available for environmental noise reduction.

All recordings were made in bed, in a semirecumbent position (elevation of head of bed of 45 degrees). After instructing the patients to breathe in as deeply as possible, sounds were recorded for 20 s. Recordings with voice and/or high environmental noise were discarded. The sampling rate was 8000 Hz.

Feature extraction

In this work, tracheal sounds were recorded and processed to quantify the spectral content of respiratory sounds. Most of the energy of tracheal sounds is located in the band from 100 to 1200 Hz, although some abnormal sounds may present higher-frequency components.40 To preserve respiratory information, the sound signals were band-pass filtered after removing the DC components by using an equi-ripple band pass (BP) finite impulse response filter from 100 to 2000 Hz (80 dB of attenuation out of the BP). The objectives of this BP filtering stage were to prevent aliasing and reduce the influence of heart, noise and muscle sounds. To enhance noise suppression, the signal from a second embedded microphone and the estimated heart signal were used to adaptively filter the respiratory signal by using a recursive least-squares adaptive filter.41

Respiratory sounds are non-stationary signals and conventional methods of frequency analysis are not recommended. In order to accurately characterize their spectral time-varying properties, it is necessary to use non-stationary signal analysis techniques such as time–frequency distributions. In this study, STFT was used for respiratory sounds analysis. Sound signals were divided into 25% overlapping intervals of 64 ms. A Hamming window was used. For each segment, STFT was first calculated and the resulting power spectrum density (PSD) was normalized to a scale from 0 to 1. The normalized PSD of each segment was used as its probability density function and features based on it, where calculated.

In the feature extraction stage, the information of each of the recordings was summarized into a reduced set of measurements. Statistical analysis was carried out to characterize the spectral properties of the signal. PSD shape, the presence of predominant frequencies, spectral content in some specific frequency bands, and entropy, among other features, were estimated to provide a priori useful information for the purpose of this study. Details of parameters are given in table 1. Evolution of each spectral feature was captured by the average and SD of the series. Therefore, the final dataset comprised 26 numerical-continuous parameters. Features were then standardized such that the resulting data had zero mean and unit variance.

Table 1

Description of the features set. The dataset was composed of 26 numerical-continuous parameters

Dimensionality reduction: PCA

Since the dataset was composed of a large number of related variables, a high correlation between some of them was expected. A statistical technique was needed to find patterns in the resulting data. The commonly used dimensionality reduction methods include linear, multidimensional scaling and non-linear techniques.42 PCA was selected to identify significant correlation among the features, and ultimately, to retain the most relevant subset of parameters.43 PCA considers a smaller number of linear combinations among the original variables. Linear combinations of the 26 variables were used to define a set of 26 new independent variables or components. The advantage of using this well-known method is that the variance of most of the information is stored in the first few components. Therefore, dimensionality of the original dataset can be reduced with minimal loss of information.

Classification

PNN is a type of feed-forward neural network designed for classification through the use of Bayes’ optimal decision rule.44 PNN is based on the radial basis function and combines some of the best attributes of statistical pattern recognition and feed-forward artificial neural networks. The network architecture presents four layers and all the units are fully interconnected.

Performance evaluation

Cross-validation was used to generate a robust stable classifier and to gauge its generalizability. Leave-one-out cross-validation often works well for estimating generalization error for continuous error functions, but it may perform poorly for discontinuous error functions such as the number of misclassified cases. As leave-one-out cross-validation is not usually the most convenient estimator to use owing to its high variability,45 10-fold cross-validation was used to estimate the performance of the classifier.

Receiver operating characteristic (ROC) curve analysis was applied to evaluate the model. The ROC curve is a graphical representation that shows the relation between the specificity and sensitivity of the binary classifier. Performance was evaluated according to regular ROC parameters such as the confusion matrix, accuracy, sensitivity, specificity, predicted values and area under the ROC curve (AUC).46 The key aspect of the algorithm is the adoption of the n-fold stratified cross-validation scheme. It allows stacking—generalizing the outputs of classifiers trained in all folds into a single set and performing the single ROC analysis on these outputs.47 The operating point that maximized the sensitivity and specificity pair was selected.

Results

Patient enrollment began in January 2010 and ended in July 2010. Table 2 summarizes the demographic and clinical features of the participating subjects whose data were analyzed in this study. In the sample of 58 patients with COPD, 25 were diagnosed by physicians as having a pneumonic exacerbation and 33 as having non-pneumonic exacerbations of COPD.

Table 2

Clinical and demographic data of the study group

A sample of the results of the STFT analysis applied to the respiratory signal acquired over the suprasternal notch for both a non-pneumonic COPD exacerbation and a case of pneumonia is shown in figure 2. In the latter, relevant spectral intensity reaches about 1500 Hz, whereas for the patient diagnosed with a non-pneumonic COPD exacerbation, the spectral intensity remains below 500 Hz. These results are entirely consistent with the findings previously reported.48

Figure 2

Time–frequency plot of a respiratory signal recorded from a patient with a diagnosis of (A) pneumonia and (B) non-pneumonic chronic obstructive pulmonary disease exacerbation. The high-frequency components due to crackles can be seen in (A) in comparison with (B), in which most of the energy is concentrated on the lower band of the spectrum. Sound intensity (in decibels) is shown on a color scale (available online only).

Quantification of spectral properties was performed through the indexes described in the previous section. PCA was applied to the dataset built from frequency features. The first seven components explained 96% of the cumulative variability of the input dataset. There was no factor beyond the seventh component that accounted for >4% of the total variance. Factor scores from the first seven PCA components (PC1…PC7) were thus included as dependent variables in further statistical analyses.

The confusion matrix calculated after the training and validation of the classifier is shown in table 3. The confusion matrix contains information about actual and predicted results obtained by a classification system. It summed the whole 10 test subsets in 10-fold cross-validation. The element (i,j) of the matrix represents the number of times that a class i subject was assigned to class j.

Table 3

Confusion matrix from 10-fold cross-validation

Sensitivity and specificity are measures of the reliability of a medical test. Sensitivity refers to the number of cases of a disease found by a particular test. Specificity refers to the accuracy with which a test diagnoses a particular disease without giving false-positive results. A sensitivity of 72% and specificity of 81.8% were achieved on validation data. The AUC is a particularly useful measure of the predictive accuracy of a model. AUC for the validation patient set processed by the PNN was 0.76. The PNN proposed in this study gave an overall correct classification rate of 77.6%. A positive predictive value is the probability of a positive test given the presence of pneumonia, and a negative predictive value is the probability of a negative test given the absence of the disease (both indexes expressed as percentages). The PNN produced a positive predictive value and a negative predictive value of 75% and 79.4%, respectively.

Comparison of ROC curves calculated from cross-validation for both the training set and the test set is shown in figure 3. The selected threshold to minimize misclassification for training data was 0.54.

Figure 3

Receiver operating characteristic (ROC) curves. Continuous line: ROC curve calculated using training data. Dashed line: ROC curve calculated using test set. The area under the curve was 0.90 for the training set and 0.76 for the test set. The operating point was selected to maximize the specificity and sensitivity pair in the training set.

Discussion

Pneumonia is an important complication of COPD and little is known about the clinical course and factors that predispose to pneumonia in patients with COPD.49 Differentiating pneumonia from AECOPD has important therapeutic and prognostic implications.

Diagnosis of pneumonia is based on clinical findings and usually includes chest radiography. The diagnostic accuracy of physical findings is generally considered low. Clinical judgment before chest x-ray or blood test reports has demonstrated moderate sensitivity and specificity. Sensitivity values ranging from 45% to 90%, and specificity values from 47% to 93% have been reported.50 However, high values of sensitivity and specificity pairs have not been achieved.

Recent studies of the use of expert systems for the detection of CAP were based on radiological findings. A ROC accuracy of 82.8% using multilayer neural networks has been reported.35 A complex alternative to chest radiography is a complete blood test. Expert systems using PNN with inputs from the complete blood test have been proposed with accuracies of 91.7% and 93.9%.33 ,34

However, the strategy proposed in this study does not attempt to compete with rules based on image processing or blood test. Some authors have concluded that ‘traditional chest examination is not sufficiently accurate on its own to confirm or exclude the diagnosis of pneumonia’, and have stated that the main reasons for this low efficiency are that the clinical signs and symptoms are not very sensitive and specific for diagnosis, and that the teaching of respiratory semiology has deficiencies.

The reliability of eliciting physical signs in examination of patients with acute respiratory comorbidities like COPD has to be taken into account.51 The risk of complications and death associated with CAP in patients with COPD and other acute respiratory disorders requires a fast and efficient diagnosis and early treatment.

Auscultation has been shown to be an important, non-invasive and simple measure for the diagnosis of lung diseases that can sometimes detect pathological processes before radiography.52 As individual clinical findings or combination of findings cannot predict CAP with certainty, prediction rules have been recommended to maximize the clinical utility of diagnostic tests. In general, few studies have examined the sensitivity, specificity, and predictive value of individual findings of history and physical examination in the diagnosis of CAP, especially in the case of respiratory comorbidities. For the relation between the finding of crackles and pneumonia, a positive likelihood ratio ranging from 1.653 to 2.654 has been shown. An additional individual finding associated with auscultation is the decrease in normal respiratory sounds. It has been shown that decreased breath sounds are significantly more likely to be present in patients with pneumonia.55

The use of auscultation as a direct indicator for pneumonia has been reported to have limited diagnosis efficacy. This limitation is mainly attributed to interobserver variability, lack of standardization, and other minor conditions such as the kind of stethoscope, noisy rooms, and the experience of the examiner. But computerized analysis improves most of these conditions by reducing the influence of noisy environments and objectivizing the measures.

It is well known that lung sounds spectra of patients with pneumonia have significantly higher frequency components than those of healthy patients,48 which means that the presence or absence of pneumonia shapes the respiratory sounds spectra. The basis of this work is that detection of such changes could be useful to discriminate between non-pneumonic and pneumonic patients with COPD. The proposed method quantifies the spectral properties of the signal (shape, predominant frequencies, spectral content in some specific frequency bands, and entropy), condenses them (PCA) and uses a machine learning algorithm such as PNN for classification. The method achieved high overall performance (72% sensitivity and 81.8% specificity). AUC was 0.90 for the training set and 0.76 for the test set.

To the best of the authors’ knowledge, no published studies have tested the diagnostic performance of computerized lung sounds as a direct indicator for pneumonia. The protocol and methods of an observational study on pediatric pneumonia diagnosis in resource-poor settings has been recently reported.31 The authors of that study aim to develop a standardized method for electronic auscultation (signal processing and machine learning) and to compare its usefulness for the detection of pneumonia with standard approaches. But results are not yet available.

In comparison with standard diagnostic rules that avoid chest x-ray examinations, the proposed method offers high performance. Studies on two of the most accepted decision rules reported an AUC of 0.67 and 0.70 as a performance estimator of the clinical prediction of CAP.53 ,56 Therefore, the results indicate that the PCA–PNN network achieved a good overall performance and gave promising results in classifying coexisting pneumonia in patients with COPD.

In comparison with other network architectures, PNNs are faster and relatively insensitive to outliers, often present in sound recordings. Additionally, PNNs generate accurate predicted target probability scores. Cross-validation leads to pessimistic results since it uses smaller training sets to design the classifier. The use of an unknown test set would provide a more robust analysis of the sensitivity and specificity of the technique and further work will be carried out. Furthermore, the next objective is to test the method on a wider spectrum of patients, without the limitation of a specific comorbidity.

The results suggest that computerized analysis of respiratory sounds will be a useful screening tool for CAP diagnosis in patients with COPD. One of the most important aspects of this study is that auscultation at a single location (suprasternal notch) can aid in the diagnosis of pneumonia in patients with COPD. The method can assist the physician in the final decision stage, by providing additional information that helps to minimize misdiagnosis. This is especially useful in rural areas (far away from clinics or radiological facilities) and in resource-constrained settings where pneumonia can be detected more readily by auscultation than by radiography because of the availability of the stethoscope.31

In addition, if detection of CAP based on the variation of certain parameters extracted from respiratory sounds is possible, then such parameters can be followed up by remote monitoring of respiratory sounds. This approach may serve as the basis for the establishment of personalized alert thresholds to determine the presence of CAP with a high probability of success in patients with severe respiratory comorbidities, which is one of the goals of this study and the reason behind the described self-auscultation procedure.57

Conclusion

In this study, a new hybrid system based on PCA and PNN to aid the detection of coexisting pneumonia in patients with COPD is proposed. PNN was chosen because of its simplicity, robustness to noise, and non-linear decision boundaries. Based on the cross-validation results, a sensitivity of 72% and a specificity of 81.8% were achieved. Experimental results demonstrated that the proposed PCA–PNN system applied to electronic auscultation performed significantly well in discriminating CAP in patients with COPD. The result is a simple, cost-effective tool that can help in resource-constrained settings and that may have a great diagnostic impact on telemedicine applications.

Acknowledgments

The authors acknowledge the many helpful comments from anonymous reviewers and the editor of this journal.

Footnotes

  • Contributors The work presented here was carried out in collaboration between all authors: they all defined the research theme, read abstracts, selected reviews for full text assessment, reviewed related papers, designed, conducted the study, interpreted its results, revised the manuscript, and approved the final version. DSM managed the review process and drafted the full article. ALJ revised the article critically for intellectual content. DSM carried out the computerized processing of signals and the datamining related tasks, and SAM the recording of data. All authors have approved the final manuscript.

  • Funding This work was supported in part by the Ambient Assisted Living (AAL) E.U. Joint Programme, by grants from the Spanish Ministry of Education and Science (Ministerio de Educación y Ciencia) and the Carlos III Health Institute (Instituto de Salud Carlos III) under projects PI08/90946 and PI08/90947.

  • Competing interests None.

  • Ethics approval The local research ethics committee of the University Hospital ‘Puertal del Mar’ of Cádiz city.

  • Provenance and peer review Not commissioned; externally peer reviewed.

References

Related Article

Free Sample

This recent issue is free to all users to allow everyone the opportunity to see the full scope and typical content of JAMIA.
View free sample issue >>

Access policy for JAMIA

All content published in JAMIA is deposited with PubMed Central by the publisher with a 12 month embargo. Authors/funders may pay an Open Access fee of $2,000 to make the article free on the JAMIA website and PMC immediately on publication.

All content older than 12 months is freely available on this website.

AMIA members can log in with their JAMIA user name (email address) and password or via the AMIA website.