Abstract:
The present invention is directed to a method for diagnosing silent and/or symptomatic cardiac diseases in human patients, based on extracting and analyzing hidden factors or a combination of hidden and known factors of ECG signals. The diagnosis method employs rest-ECG signals of a group of diagnosed patients, the group consisting of patients a-priori diagnosed as sick patients and of patients a-priori diagnosed as healthy patients by trusted procedures. Artificial neural networks are then iteratively trained to accurately classify the cardiac disease by processing the corresponding raw input signals of the diagnosed patients. The weights and biases data representing the trained neural networks are saved. Unknown, new patients are diagnosed as sick or healthy patients by processing their corresponding raw ECG signals by the trained neural networks.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to the field of medical signals analysis based on Machine Learning processes. More particularly, the invention relates to a method and system for diagnosing cardiac diseases, based on factors obtained by employing Artificial Neural Network processing of medical signals. 
       BACKGROUND OF THE INVENTION 
       [0002]    Ischemia is an insufficient supply of blood to an organ, usually due to a blocked artery. Myocardial ischemia is an intermediate condition in coronary artery disease during which the heart tissue is slowly or suddenly starved of oxygen and other nutrients. Eventually, when blood flow to the heart is completely blocked, the affected heart tissue will die leading to a heart attack. Yet, only 15% of heart attacks happen this way. Pathologists have demonstrated that most attacks occur after a plaque fibrous cap on the artery internal wall breaks open, promoting a blood clot to develop over the break. The clot blocks the artery, and a heart attack is inevitable and sudden (Libby. P., Atherosclerosis: The new view. Scientific American, May 2002, 29-37.). Ischemia can be symptomatic (physical and diagnostical) or silent (i.e., without symptoms). According to the American Heart Association, up to four million Americans may have silent ischemia and be at high risk of having a heart attack with no early warning. 
         [0003]    Diagnostic tests for myocardial ischemia include: rest, exercise, or ambulatory ElectroCardioGrams (ECGs); scintigraphic studies (radioactive heart scans); echocardiography; coronary angiography; and, rarely, positron emission tomography. However, the most reliable diagnosis of the cardiac arteries condition is the catheterization procedure. Notably, except for the rest-ECG, these tests are expensive, less accessible, and in the case of catheterization, also invasive and carry risk to the patient. 
         [0004]    An ECG shows the heart&#39;s electrical activity and may reveal a lack of oxygen supply to the heart muscles. Impulses of the heart&#39;s activity are recorded by the ECG monitoring devices on paper, or digitally. The standard, rest-ECG test takes about 10 minutes and it is performed in a physician&#39;s office. Another type of electrocardiogram, known as the exercise stress test, measures the response to exertion when the patient is exercising on a treadmill or a stationary bike. It is performed in a physician&#39;s office or an exercise laboratory and takes 15 to 30 minutes. This test is more reliable than a resting ECG in diagnosing ischemia. Sometimes an ambulatory ECG is ordered, wherein the patient wears a portable ECG monitoring machine, called a Holter monitor, for 12, 24, or 48 hours. 
         [0005]    Diagnosis of cardiac diseases, based on ECG recordings, usually employs rule-based criteria, namely: measuring and analyzing well defined “intervals”, “segments” and “waves” of the heart impulse signal ( FIG. 1 ). In many cases the diagnosis may rely on a visual inspection by an expert cardiologist, capable of analyzing the plot morphology. For Example,  FIGS. 2A and 2B  demonstrate changes in ECG morphology that may indicate ischemia.  FIG. 2A  shows a normal heart impulse signal, and  FIG. 2B  shows a heart impulse signal with ST (ST Segment,  FIG. 1 ) changes (i.e., with a deviated ST Segment), in which an apparent reversal of the T-wave ( FIG. 1 ) is seen at the end of the heart cycle—a possible indication of ischemia. 
         [0006]    However, such ‘rule-based’ diagnosis criteria are inefficient and inaccurate. Many rest-ECGs of cardiac disease patients, who did not suffer from a heart attack, seem normal under visual inspection. In fact, about 25% of patients with angina pectoris (i.e., suffer from physical symptoms as chest pain, tightness or heaviness in the chest) have normal ECGs. Moreover, some of these patients with physical complaints may not suffer from ischemia at all. This does not mean that rest-ECGs do not carry any reliable information about the cardiac disease. In fact, feasibility tests, employing neural networks have demonstrated that rest-ECGs carry salient information (in the form of hidden factors) about the condition of the cardiac system. These factors may be complex, and thus invisible even to an expert cardiologist&#39;s eye. However, they may be revealed using machine learning methods, such as artificial Neural Networks (NN) or Support Vector Machines (SVM). Such methods produce these hidden factors “internally” by scanning a database of pre-diagnosed ECGs, without the need for further a-priori knowledge. 
         [0007]    Several patents disclose methods for processing medical signals that employ NN for ECG analysis. These patents analyze common ECG factors, e.g., the QRS complex (U.S. Pat. Nos. 5,020,540 and 5,947,909); or, they analyze data that was extracted from ECG signals by other than NN means (WO 01/82099 A1); or, they do not diagnose Cardiac Diseases (U.S. Pat. No. 5,640,966 and EP 0712605A1 detect ECG electrodes which are erroneously attached to the patient); or, they detect Cardiac Arrhythmia or Ventricular Tachycardia, which produce a significantly different and easily detected signals (U.S. Pat. Nos. 5,280,792 5,251,626 6,192,273 and 5,280,792). However, none of these patents employ NN based, pattern recognition processes, to diagnose Cardiac Diseases based on unknown, hidden factors. Furthermore, none of these patents is capable of diagnosing Cardiac Diseases in normal (i.e., healthy) looking rest-ECG. 
         [0008]    There is therefore an ongoing need to provide inexpensive and non-invasive means for carrying out Diagnosis by Hidden Factors (DHF) for (early) diagnosis of cardiac diseases. 
         [0009]    The present invention aims at providing a method and system for diagnosing cardiac diseases, based on standard, rest-ECG recordings. 
         [0010]    It is also an object of the present invention to provide a method and system for diagnosing cardiac diseases, based on ‘machine learning’ (i.e., learning from examples) classification processes. 
         [0011]    It is also an object of the present invention to provide a method and system for carrying out DHF, based on pattern recognition and classification processes. 
         [0012]    It is another object of the present invention to provide a method and system for carrying out DHF that produces its own hidden factors by training NNs according to a-priori diagnosed ECG examples. 
         [0013]    It is a further object of the present invention to provide a DHF of cardiac diseases, based on pattern recognition and classification processes utilizing standard rest-ECG recordings. 
         [0014]    It is a still another object of the present invention to provide neural networks architecture and dynamics for carrying out DHF. 
         [0015]    It is an additional object of the present invention to provide a combination of methods for optimizing the generalization capability of DHF. 
         [0016]    Other objects and advantages of the invention will become apparent as the description proceeds. 
       SUMMARY OF THE INVENTION 
       [0017]    The following terms are defined in order to better understand the invention: 
         [0018]    ECG (ElectroCardioGram): a record of the electrical activity in the heart during the cardiac cycles. 
         [0019]    ECG Leads: A scheme of electrode attachments to the body, linked via an electrical wire for measuring electrical signals from the heart. There are 12 standard leads: 
         [0020]    Lead 1 (L I ): Connections to the two arms. 
         [0021]    Lead 2 (L II ): Connections to the right arm and foot. 
         [0022]    Lead 3 (L III ): Connections to the left arm and foot. 
         [0023]    Lead 4 (aVR): Augmented-voltage connection to the right arm. 
         [0024]    Lead 5 (aVL): Augmented-voltage connection to the left arm. 
         [0025]    Lead 6 (aVF): Augmented-voltage connection to the foot. 
         [0026]    Leads 7-12 (V1-V6): The six chest connections. 
         [0027]    The following filters are standard in ECG recordings: 
         [0028]    Notch filter: Removes a narrow slice of frequencies from the filtered signal. The notch filter removes from the ECG signal frequency harmonics that are induced by the domestic electricity network. Such that for a given electricity network operating with a network frequency of f Hz, the notch filter preferably removes from the ECG signal the f, 2f and 3f, harmonics (e.g., for f=50 Hz of the Israeli electricity network the said harmonics are 50, 100 and 150 Hz. 
         [0029]    Baseline filter: A High-Pass filter which removes low frequencies of the breathing cycle. 
         [0030]    EMG filter: Removes noise in a gradually increasing rejection magnitude, from 10 Hz and above. 
         [0031]    The present invention is directed to a method for diagnosing silent and/or symptomatic cardiac diseases in human patients, based on extracting and analyzing hidden factors or a combination of hidden and known factors of ECG signals. The diagnosis method employs rest-ECG signals of a group of diagnosed patients that are acquired by any ECG recording unit. This group consists of patients, a-priori diagnosed as sick patients and of patients, a-priori diagnosed as healthy patients by trusted procedures. Furthermore, all signals of healthy and sick patients are diagnosed as healthy, according to standard, ‘rule-based’, visual methods of ECG diagnosis. Alternatively, all signals of healthy and sick patients are diagnosed as sick according to standard, ‘rule-based’ visual methods. 
         [0032]    Artificial neural networks are then iteratively trained to accurately classify the cardiac disease by processing the corresponding raw (i.e., pre-processed but not analyzed rest-ECG) input signals of the diagnosed patients. Whenever required, training network cycles are added, until predetermined training performance conditions are satisfied. During the iterative training, diagnosed patients that have raw input data that deteriorates the convergence of the training process, in a large portion of the trained neural networks, are excluded from the group. The weights and biases data representing the trained neural networks are saved. Unknown, new patients are diagnosed as sick or healthy patients by processing their corresponding raw ECG signals by the trained neural networks. 
         [0033]    More specifically, rest-ECG signals of patients a-priori diagnosed as sick patients, and of patients a-priori diagnosed as healthy patients by a trusted procedure such as catheterization, are acquired. Furthermore, all rest-ECG signals of both healthy and sick patients, are diagnosed as ‘healthy’ (alternatively, all rest-ECG signals of both healthy and sick patients, are diagnosed as ‘sick’) according to standard, ‘rule-based’ visual methods. These signals are first processed to obtain filtered input-signals, defined within a single heart cycle, aligned about the same isoelectric reference and normalized within predefined boundaries. Signals of sick and of healthy patients are randomly separated into ‘train’ and ‘test’ sets, where each set containing signals of both healthy and sick patients. A multilayer artificial neural network is iteratively trained to correctly classify the diagnosed patients, by forwarding the signals of the train-set through the network, comparing the network output with the trusted diagnosis, and updating weights and biases data of the network accordingly. Each time, inputs that correspond to the diagnosed patients are fed into the network, while providing weights and biases data to each cycle, and updating them using error minimization techniques, until a predetermined training performance condition is satisfied or deteriorated. The trained network is then tested by processing the inputs that correspond to the selected test-set signals and the test results of the trained network are maintained. Trained networks are added by repeating this process, until a predetermined test-performance condition, based on the aggregated test results of all trained networks is satisfied. Inputs that consistently contribute a significant error in the training process of the trained networks are disqualified and the training process is repeated with the reduced set of inputs, and for a number of ECG Lead signals. The final weights and biases data obtained by each of the trained neural networks are saved. Then, new ECG signals of unknown (i.e., that were not included in the training phase) patients are acquired and processed to obtain new filtered input-signals, aligned about the same isoelectric reference and normalized using exactly the same formula that was applied for processing the a-priori diagnosed signals. Each of the new signals is applied as an input of the trained neural networks, while utilizing the saved weights and biases data and transforming the output results of each new signal to obtain “sick” or “healthy” classifications by the networks. Then, each of the new signals is classified as sick or healthy according to the majority of the networks classification results obtained for each signal of each lead separately. Finally, each of the unknown patients is diagnosed according to the majority of Leads classifications of his signals, while considering the majority of results obtained from the various Leads. 
         [0034]    Diagnosis of new patients (i.e., generalization) is improved by any combination of generalization-improvement techniques, such as optimizing the NN architecture and/or ‘regularization’ of the performance function and/or ‘early stopping’ of the training process. 
         [0035]    Preferably, processing is performed by filtering each acquired signal with a High-Pass filter, a notch filter, an EMG filter, or any combination thereof, before extracting a raw-input signal from each of the filtered signals, wherein the raw-input signal comprises a segment within a single heart cycle. All raw-input signals are aligned about the same isoelectric reference and the aligned raw-input signals are normalized within predetermined upper and lower boundaries. 
         [0036]    The single cycles extracted from each of the signals are of the same time interval, and taken starting at the same predefined time interval before the peak of an R-wave and may be about 600 milliseconds long. The predefined time interval may be about 80 milliseconds. The upper bound may be larger than 0.75 and smaller than 1 and the lower bound may be smaller than 0.25 and larger than 0. Prior to, or during the processing phase, the ECG signals are converted into digital format, preferably by utilizing a sampling frequency of about 500 HZ. 
         [0037]    Training is carried out utilizing signals of healthy and sick patients which are all diagnosed as healthy, according to standard, rule-based, visual methods or alternatively, by utilizing signals of healthy and sick patients which are all diagnosed as sick patients according to standard, rule-based, visual methods. 
         [0038]    The present invention is also directed to a system for diagnosing cardiac diseases in unknown patients, based on extracting and analyzing hidden factors or a combination of hidden and known factors of rest-ECG signals, that comprises: 
         [0039]    a database of a-priori diagnosed ECG signals of sick and of healthy patients, where the patients are diagnosed via a trusted procedure; 
         [0040]    a signal processing unit for digitizing and processing the signals and for iteratively training multilayer artificial neural networks to correctly classify the diagnosed patients, by processing their corresponding raw input data, while whenever required, adding trained network cycles, until predetermined training and testing performance conditions are satisfied; 
         [0041]    a memory for saving the weights and biases data representing the trained neural networks; and 
         [0042]    a classification module for diagnosing unknown patients as sick or healthy patients by processing their corresponding raw signals by the trained neural networks. 
         [0043]    More specifically, the system comprises: 
         [0044]    a database of a-priori diagnosed ECG signals of sick and of healthy patients, where the patients are diagnosed via a trusted procedure; 
         [0045]    a signal processing unit for processing the signals to obtain input-signals aligned about the same isoelectric reference and normalized within predefined boundaries, and for training artificial neural networks utilizing weights and biases data obtained; 
         [0046]    a memory for saving weights and biases data of artificial neural networks; and 
         [0047]    a classification module for acquiring new ECG signals of a non-diagnosed patient and processing the new signals, to obtain new input-signals aligned about the same isoelectric reference and normalized within the same predefined boundaries used by the signal processing unit. The classification module comprises sets of trained artificial neural networks for diagnosing the new signals utilizing the weights and biases data stored in the memory. 
         [0048]    The system may further comprise a training unit for training an artificial neural network, in which training is performed by randomly selecting signals of sick and healthy patients from the database of a-priori diagnosed ECG signals, to be used for training and for testing of the training, and in which training is continuously carried out with all the train and test signals in the database, until predetermined training and generalization performance conditions are satisfied. 
         [0049]    The processing unit may include filters for removing interfering signals from the cardiac signal and processing means for extracting a raw-input signal from the filtered signals, wherein the raw-input signal comprises a segment within a single cycle, for aligning the raw-input signals about the same isoelectric reference, and for normalizing the aligned raw-input signals within predetermined upper and lower boundaries. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS  
         [0050]    In the drawings: 
           [0051]      FIG. 1  illustrates the morphology elements employed in “rule based” diagnosis of ECG: The “intervals”, “segments” and “waves” defined within a single heart cycle; 
           [0052]      FIG. 2A-B  demonstrates changes in ECG morphology that indicate a possible ischemia; 
           [0053]      FIG. 3  is a block diagram demonstrating the NN Feed Forward architecture; 
           [0054]      FIG. 4  graphically demonstrates raw-input segmentation of a Lead 1 ECG signal, digitized with a 500 Hz sampling rate; 
           [0055]      FIGS. 5A to 5C  illustrate a possible frequency response of the High-Pass, notch, and EMG filters employed in processing the ECG signal; 
           [0056]      FIG. 6  demonstrates the alignment of the raw-input signals about a common isoelectric reference value, and their normalization within given boundaries; 
           [0057]      FIG. 7  is a block diagram illustrating a preferred embodiment of the DHF system of the invention; 
           [0058]      FIG. 8  is a flowchart showing the initial stages of generating the database for training the neural networks; 
           [0059]      FIG. 9  is a flowchart of the preprocessing steps of the raw ECG signal according to a preferred embodiment of the invention; 
           [0060]      FIG. 10  is a flowchart showing the steps of the first training cycle of the NN according to a preferred embodiment of the invention; 
           [0061]      FIG. 11  is a flowchart illustrating a preferred process for determining the sets of classifying-networks for the DHF of the invention; and 
           [0062]      FIG. 12  is a flow chart illustrating the process of classifying a new signal of a non-diagnosed patient. 
       
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
       [0063]    The Diagnosis by Hidden Factors (DHF) methods, disclosed by the present invention, extract hidden factors from ECG signals and track them, in order to produce a diagnosis of given cardiac diseases. The process is based on scanning a database of diagnosed a-priori (e.g., via catheterization) ECGs of healthy and sick patients, whose signals all look diagnostically alike to an expert cardiologist (i.e., either all patients&#39; signals, healthy and sick, look healthy, or they all look sick). 
         [0064]    The scan process is performed using sets of Neural Networks, which, being trained with the ECG examples, produce matrices of parameters, encoding the hidden factors of a given cardiac disease. The Neural Networks are capable of generalizing, namely, correctly diagnosing new ECGs that were not included in the scanned database. 
         [0065]    The training and diagnosis of each cardiac disease are based on standard, rest-ECG recordings. Still, as feasibility tests demonstrated, DHF yields a significantly more reliable diagnosis compared with a diagnosis made by an expert cardiologist. 
         [0066]    DHF is preferably performed as a parallel, distributed, trained by examples, pattern-recognition and classification task. Evidently, it is fundamentally different from the traditional rule-based, morphological methods which are currently employed by physicians and software. 
       Neural Networks for Signal Classification 
       [0067]    The classification task (e.g., classification of ECG signals of healthy and sick patients) solved by NNs can be defined as follows: 
         [0068]    Given a database of N observations (herein after also referred to as “the training set”), where each observation is assigned a pair of vectors
       A signal vector p n  (n=1, 2, . . . , N), comprising d elements (samples),       
 
         [0000]    
       
         
           
             
               
                 p 
                 n 
               
               = 
               
                 [ 
                 
                   
                     
                       
                         p 
                         1 
                         n 
                       
                     
                   
                   
                     
                       
                         p 
                         2 
                         n 
                       
                     
                   
                   
                     
                       ⋮ 
                     
                   
                   
                     
                       
                         p 
                         d 
                         n 
                       
                     
                   
                 
                 ] 
               
             
             , 
           
         
       
       
         
           
              produced utilizing digital signal processing of a patient&#39;s heart impulse signal; and 
             an associated “truth” vector/value t n  given by a trusted source (e.g., preset according to a-priori trusted diagnosis of the patient). 
           
         
       
     
         [0071]    In the case of the ECG classification task, p n  is a column vector of, for example, d=300 real values (originally voltage readings of the ECG signal), normalized in the range [0 1], 0&lt;p i   n &lt;1. The truth vector preferably has two possible states, wherein 
         [0000]    
       
         
           
             
               t 
               n 
             
             = 
             
               [ 
               
                 
                   
                     1 
                   
                 
                 
                   
                     0 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    indicates that the ECG was taken from a healthy patient, and 
         [0000]    
       
         
           
             
               t 
               n 
             
             = 
             
               [ 
               
                 
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    indicates that it was taken from a CD (with cardiac disease) patient. Alternatively, the dimensions of the truth vector may be reduced to t n =0 for healthy, and t n =1 for a CD patient. The “trusted diagnosis” is preferably constructed from a medical diagnosis based on catheterization or an equivalent procedure. 
         [0072]    The NN task at the training phase is to find the correct classification for each input vector p n , i.e., to perform the mapping p n →t n . To achieve this goal, the NN parameters are typically determined through a process of training, during which all observations {p n , t n } are iteratively processed by the NN while applying an error minimization algorithm. The training is stopped when the above mapping is performed correctly, or within a tolerable error, for all N observation pairs {p n , t n }. 
         [0073]    Nevertheless, in order to become a practical classifier the NN is expected to generalize well. Namely, given a new input p new , which it has not encountered in the process of training, the NN should yield the correct classification as “healthy” or “sick”. In practice, once completing the training of the NN, the correct classification of a new ECG is not given a-priori, but a well trained NN should yield the correct classification. This means that given a new patient&#39;s ECG signal (i.e., new processed heart impulse signal vector p new ), the well trained NN will classify it correctly as if the patient was diagnosed by catheterization. 
         [0074]    An NN is defined by its architecture and dynamics. 
       The “Feed Forward” (FF) Architecture: 
       [0075]    The FF architecture is arranged in M layers, as shown in  FIG. 3 . Each layer m (m=1, 2, . . . , M), except of the input layer (layer  0 , which is the input vector p n ), consists of the following objects: 
         [0076]    1. A weight matrix W m , 
         [0077]    2. A bias vector b m . 
         [0078]    3. A “transfer function” ƒ m . Common transfer functions used in NN implementations are:
       ƒ(x)=sign(x) (“sign”);   ƒ(x)=α·x (“linear”);   ƒ(x)=(1+e −2·β·x ) −1  (“logistic”);       
 
         [0000]    
       
         
           
             
               f 
                
               
                 ( 
                 x 
                 ) 
               
             
             = 
             
               
                 
                    
                   
                     β 
                      
                     
                         
                     
                      
                     x 
                   
                 
                 - 
                 
                    
                   
                     
                       - 
                       β 
                     
                      
                     
                         
                     
                      
                     x 
                   
                 
               
               
                 
                    
                   
                     β 
                      
                     
                         
                     
                      
                     x 
                   
                 
                 + 
                 
                    
                   
                     
                       - 
                       β 
                     
                      
                     
                         
                     
                      
                     x 
                   
                 
               
             
           
         
       
       
         
           
              (“hyperbolic tangens”) 
           
         
       
     
         [0082]    4. All output vector V m . ps Dynamics 1—Propagating a Signal: 
         [0083]    As demonstrated in  FIG. 3 , the dynamics of propagating a signal through the feed forward NN architecture (Hertz, Krogh &amp; Palmer: Introduction to the theory of neural computation. Addison-Wesley) are as follows: 
         [0084]    1. Choose a signal vector p n  and process it through the 1 st  layer, thereby producing the 1 st  layer output vector: V 1 =ƒ 1 (W 1 p n +b 1 ), where η(h) indicates applying the transfer function ƒ on h; It should be noted that ƒ may differ from one layer to another. 
         [0085]    2. Use the output vector of the 1 st  layer, V 1 , as input to the 2 nd  layer, thereby producing the 2 nd  layer output vector: V 2 =ƒ 2 (W 2 V 1 +b 2 ); 
         [0086]    3. Repeat the process for all remaining layers (m=3, 4, . . . , M) to obtain the corresponding output vectors: 
         [0000]        V   m =ƒ m ( h   m )=ƒ m ( W   m   V   m−1   +b   m ) 
         [0000]      where 
         [0000]    
       
      
       h 
       m 
       =W 
       m 
       V 
       m−1 
       +b 
       m  
      
     
         [0087]    4. The resulting vector V M , produced by the last layer, is the NN output O n  (i.e., O n ≡V M ) for the input of signal vector p n . Note that during training O n  may differ from the desired output t n . 
       Dynamics 2—Training the NN: 
       [0088]    In a trained NN the weight matrices W m  and bias vectors b m  are adjusted to yield output vectors V M  which are close (within a tolerable error) to the associated “truth” value t n : |O n −t n |→0. 
         [0089]    An NN may be trained to produce the expected outputs by applying the “(Error) Back Propagation” (BP) training algorithm, as follows: 
         [0090]    1. Prepare the d×N inputs matrix P. Each column in P is a signal vector p n  (n=1, 2, . . . N) of length d; 
         [0091]    2. Prepare a truth matrix T of length N. Each column t n  of T equals 
         [0000]    
       
         
           
               
             
               [ 
               
                 
                   
                     1 
                   
                 
                 
                   
                     0 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    if the corresponding signal vector p n  is processed from the heart impulse signal (ECG) of a healthy patient, or 
         [0000]    
       
         
           
               
             
               [ 
               
                 
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    whenever the ECG is of a sick (CD) patient; 
         [0092]    3. Define the number of hidden layers M, and the size of each layer S int   m . It should be noted that the hidden layer size determines the size of the layer&#39;s output-vector: length(V m )=S int   m . 
         [0093]    4. Choose an appropriate transfer function ƒ m  for each layer; 
         [0094]    5. Initialize all weights and biases (W m  matrices and b m  vectors for all m values) to small random values. For example, if the size of the 1 st  intermediate layer is S int   1 , then the dimensions of the weight matrix W 1  of the 1 st  layer will be S int   1 ×d, and it&#39;s bias vector b 1  will be S int   1 ×1, a S int   1 -elements column vector. 
         [0095]    6. Choose the first input vector signal p 1  (the first column of P) and propagate it forward through the network, as was described herein above, thereby producing the respective output vector of the NN: O 1 =V M . where O 1  is a 2-element vector comprising the elements O 1   1  and O 2   1 . 
         [0096]    7. Compute the weighted errors for the output layer: δ i   M =ƒ′(h i   M )·└t i   1 −O i   1 ┘, (where i=1,2; h m =W m V m−1 +b m ; h i   m  is the i-th element of h m  and therefore δ i   M  is a 2×1 vector of the weights between the I neuron in the M−1 layer and the two output neuron of layer M; ƒ′ is the derivative of the transfer function, e.g., f′=2βf·(1−f) in the case of the logistic function). 
         [0097]    8. Compute the weighted errors for the preceding layers by propagating the errors backwards: δ i   m−1 =ƒ′(h i   m−1 )·(W m ·δ m ) i  for m=M, M−1, . . . , 2 and i=1,2, . . . , S int   m . 
         [0098]    9. Compute ΔW m =η·δ m ·V m−1 , where η is the learning rate, preferably of order 0.01, and update all weights according to: W new   m =W old   m +ΔW m . 
         [0099]    10. Repeat steps 6-9 for the second input signal p 2 . 
         [0100]    11. Perform steps 6-9 for all N signal vectors in P. This completes one epoch (cycle) of training. 
         [0101]    12. Train the network for a large number of epochs, i.e., repeat steps 6-11, until the mean squared classification error is smaller than a tolerable boundary value E T : 
         [0000]    
       
         
           
             
               Err 
               = 
               
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     N 
                   
                    
                   
                     
                       [ 
                       
                         
                           t 
                           i 
                         
                         - 
                         
                           O 
                           i 
                         
                       
                       ] 
                     
                     2 
                   
                 
                 &lt; 
                 
                   E 
                   T 
                 
               
             
             , 
           
         
       
       
         
           
             Where Err is termed also “the performance function”. 
           
         
       
     
       Testing the NN Performance: 
       [0103]    After the NN has reached the desired training performance (i.e., the output vectors of the training set corresponds with the expected truth values within the tolerable deviation error), freeze all elements of the weights W m  and biases b m . To test the network generalization performance, a new signal vector p test  (i.e., one that was not used during training) is processed through the network utilizing the frozen weights and bias values, as follows: 
         [0104]    1. V 1 =ƒ 1 (W 1 ·p test +b 1 ); 
         [0105]    2. V 2 =ƒ 2 (W 2 ·V 1 +b 2 ) 
         [0106]    3. Continue the process for all layers, thereby obtaining the output vectors: 
         [0000]        V   m =ƒ m ( h   m )=ƒ m ( W   m   ·V   m−1   +b   m ),       and yield the output vector of the last layer:         
         [0000]        O   test   ≡V   M =ƒ M ( h   M )=ƒ M ( W   M   ·V   M−1   +b   M ) 
         [0108]    4. Classify p test  according to the following decision rule, where 
         [0000]    
       
         
           
             
               O 
               test 
             
             = 
             
               
                 [ 
                 
                   
                     
                       
                         o 
                         1 
                       
                     
                   
                   
                     
                       
                         o 
                         2 
                       
                     
                   
                 
                 ] 
               
                
               
                 : 
               
             
           
         
       
       
         
           
             If 0.5&lt;o 1 &lt;1 and 0≦o 2 ≦0.5, then the ECG signal p test  is classified as “healthy”. 
             If 0≦o 1 ≦0.5 and 0.5&lt;o 2 ≦1, than the ECG signal p test  is classified as “CD” (Cardiac Disease—“sick”). 
           
         
       
     
       Improving Training Performance: 
       [0111]    Adding Momentum 
         [0112]    Performance can be improved during the training process by adding a momentum term in the computation of the weight changes (ΔW). More particularly, a momentum term is introduced into the weight change computation: ΔW m (t)=η·δ m ·V m−1 +α·ΔW m (t−1), where t refers to the current training cycle and t−1 to the preceding cycle. The momentum parameter α is set between 0 and 1, preferably about 0.9. Such an addition of momentum results in a faster training process that yields smaller Err (squared classification error) values. 
         [0113]    Variable Learning Rate 
         [0114]    The learning rate η can be adjusted to the progress of the training error Err, as follows:
       If Err(t)&gt;k·Err(t−1), where k&gt;1, then η is decreased by a factor η dec  where η(t)=η dec ·η(t−1); and   If Err(t)&lt;Err(t−1), then η is increased by a factor η inc , where η(t)=η inc ·η(t−1).       
 
         [0117]    The parameters k, η dec  and η inc , are optimized by trial and error. 
         [0118]    Other Training Processes: 
         [0119]    The Back Propagation process described above is the most commonly used method for training NNs, but not necessarily the fastest. Other training processes exist that may result in a considerably shorter training runtimes. These processes include: Conjugate Gradient methods, in particular, the Scaled Conjugate Gradient Descent (see: Moller, M. F. A scaled conjugate gradient algorithm for fast supervised learning.  Neural Networks  6(4): 525-533, 1993), Resilient Propagation (see: Riedmiller, M. and H. Braun. A direct adaptive method for faster backpropagation learning: The RPROP algorithm.  IEEE International Conference on Neural Networks  ( San Francisco ), vol. 1, pp. 586-591. IEEE, New York. 1993), The Lenenberg-Marquardt Method (see: Hagan, M. and M. Menhaj. Training feedforward networks with the Marquardt algorithm.  IEEE Transactions on Neural Networks.  5(6): 989-993, 1994). These processes and others are available commercially (see: matlab—Neural Networks Toolbox Manual). The choice of the optimal training process is based on running benchmark tests of the different processes, using the same input and output matrices P, T, and comparing runtimes and generalization performance. 
       Improving Generalization 
       [0120]    Training a NN to the smallest possible error ET may result in overfitting. Namely—the NN performs well when tested with the trained data, but fails to classify new signals (i.e., poor generalization). Since the NN generalization performance is crucial for the applicability of the invention, it may be improved by utilizing one or more of the following methods: 
         [0121]    Optimizing network architecture: the larger the network, i.e., with more and larger intermediate layers, the more it is adjustable to a specific database (overfitting) and as a result it cannot generalize well. Therefore the network architecture should be the slimmest possible, i.e., with the minimal number, of the smallest hidden layers. The exact architecture is preferably determined by ‘Cross-Validation’ and ‘Bootstrap’ methods, or by trial and error (see: Model selection with cross-validations and bootstraps—by A. Landasse, V. Wertz &amp; M. Verleysen; ICNN/ICONIP 2003, LNCS 2714, pp. 573-580). 
         [0122]    Regularization: the performance function, 
         [0000]    
       
         
           
             
               Err 
               = 
               
                 
                   
                     ∑ 
                     
                       i 
                       = 
                       1 
                     
                     N 
                   
                    
                   
                     
                       ( 
                       
                         
                           T 
                           i 
                         
                         - 
                         
                           O 
                           i 
                         
                       
                       ) 
                     
                     2 
                   
                 
                 &lt; 
                 
                   E 
                   T 
                 
               
             
             , 
           
         
       
     
         [0000]    may be modified by adding a term that accounts for all the network weights and biases: RegErr=γ·Err+(1−γ)·[Σw i,j   2 +Σb j   2 ], where w i,j  is an element of a weight matrix W, and γ may be determined by ‘Cross-Validation’ and ‘Bootstrap’ methods, or by trial and error. 
         [0123]    Early stopping: the training data set may be divided randomly into 2 subsets, wherein about 80% are used for training and about 20% are used for validation during training: After each epoch of training with the training subset, the network generalization performance is tested using the validation subset. The training is stopped after the error obtained utilizing the validation set is reduced beyond the tolerable deviation error, or at a local minimum of the validation-test error. Note that finding a local minimum is the common practice in NN training since practically it is impossible to find the global minimum. One has to scan the whole error surface which is huge. However, as long as the deviation error is tolerable, there is a small effect to whether it was found at a local or at a global minimum. To reduce this effect, a large number (e.g., NB) of different networks are trained for each Lead. 
         [0124]    It should be noted that the final choice of the ‘model’, i.e., the NN architecture and dynamics, as well as improvement/optimization algorithms, may be determined by ‘Cross-Validation’ or ‘Bootstrap’ methods. These methods are aimed at estimating the mean generalization error (i.e., the mean squared error when testing the model with infinite number of new inputs) for each model: 
         [0000]    
       
         
           
             
               E 
               generalization 
             
             = 
             
               
                 lim 
                 
                   N 
                   → 
                   ∞ 
                 
               
                
               
                 
                   ∑ 
                   
                     i 
                     = 
                     1 
                   
                   N 
                 
                  
                 
                   
                     
                       ( 
                       
                         
                           t 
                           l 
                         
                         - 
                         
                           o 
                           i 
                         
                       
                       ) 
                     
                     2 
                   
                   N 
                 
               
             
           
         
       
     
         [0125]    Database segmentation: Heterogeneous database (i.e., including in the input matrix P ECGs of both male and female patients, in a wide range of ages, taking medications or not, smokers and non-smokers, etc.) may decrease the generalization performance of the NN. To solve the problem the database may be divided into more homogeneous subgroups, each containing patients of a single gender, from a small range of ages and similar in other parameters (smoking, medications). Each subgroup may be trained separately, yielding its own set of NNs. New patients will be diagnosed by the set of NNs matching their personal details (e.g., gender, age). 
       The DHF Process 
       [0126]    The Hidden Factor Diagnosis of the invention preferably combines NN classification with a unique signal processing and a test-set resampling process, which provide a reliable, ECG-based, diagnosis method. 
       Generating the Training-Database 
       [0127]    The steps of generating the training database are shown in the flowchart in  FIG. 8 . This process is initiated in step  80 , in which standard rest-ECG signals are recorded from a large number of diagnosed, healthy and sick (CD of a given type, e.g., Ischemia, Cardiac Artery Disease—CAD), patients. In step  81  the recorded ECG signals are classified into separate homogeneous groups, for example, according to the following criteria: Gender, smoking, medication, age. Such a group may, for example, be defined to include only ischemic male patients, which are 40-50 years old, smoking and not taking any medications. Each of the groups is constructed to include N patients, preferably, half (N/2) of which are healthy, wherein the other half diagnosed with a CD (the number of patients N may vary from one group to another). The DHF process is preferably performed on each group separately, since in a homogeneous group, the main differentiating factor between healthy and sick patients is the CD factor (and not other factors such as gender or age). 
         [0128]    Next, in step  82 , the heart impulse signal data for each patient is acquired from selected ECG leads, preferably from leads 1, 5 and 12 (L I , aVL and V6). It should be noted that the DHF process of the invention may be carried out utilizing other ECG lead signals, or with other type of heart activity signals, or with a combination thereof. 
         [0129]    Moreover, the generation of the training database should also consider the following requirements: 
         [0130]    1. The diagnosis of all patients must rely on catheterization or an equivalent trusted procedure; 
         [0131]    2. The ECG signals should be digital, or transformed into a digital format; 
         [0132]    3. The recording duration of the ECG signals should be around 10 seconds. 
         [0133]    The following discussion refers to only one group of patients (e.g., Ischemic or with another CD), half of which (N/2) are diagnosed as healthy, and all others (N/2) patients are diagnosed as sick (diagnosed with CD) by a trusted procedure. The DHF of the invention is preferably carried out for each of the disease groups separately. 
       Signal Processing 
       [0134]    In a preferred embodiment of the invention the recorded ECG signals are at least 10 seconds long ECG recordings, preferably digitized with a sampling frequency rate of 500 Hz. Each ECG signal is preferably processed according to the processing steps shown in  FIG. 9 , which should be carried out on each of the selected ECG leads (e.g., 1, 5, and 12), of each of the N patients of the group. 
         [0135]    The processing starts in the filtering step  90 , wherein the ECG signals are preferably filtered by a High-Pass Filter (e.g., a HPF with a cutoff frequency of 1 Hz, shown in  FIG. 5B ), a Notch filter (e.g., 50 and 150 Hz, shown in  FIG. 5A ) and a low-pass, EMG filter with a knee around 10 Hz shown in  FIG. 5C . These filters are a common practice in ECG recordings. 
         [0136]    In step  91 , a raw-input signal, rp n , is extracted from each sampled and filtered signal (for the n=1,2, . . . ,N patient). The raw-input signal is preferably a segment within a single heart cycle, as shown  FIG. 4 . The segment of the raw-input signal preferably starts 80 milliseconds to the left of the peak of the R-Wave (based on Lead 1), and is preferably 600 milliseconds long. If a sampling rate of 500 Hz is used for digitizing the ECG signal, the raw-input signal rp n  obtained comprises 300 samples, i.e., a column vector of 300 elements. As will be described herein below, the rp n  signals of all patients are centered horizontally about a common point, which is preferably the peak of the R-Wave along the time axis (as shown in  FIG. 6 ). 
         [0137]    In step  92 , the rp n  signals of each lead of all of the N patients are aligned in order to obtain a common isoelectric reference value, i.e., the raw-input vectors are shifted “up” or “down” so that the 1 st  element in the rp n  vectors has the same value for all n signals, as demonstrated in  FIG. 6 . After aligning the signals, in step  92 , all the raw-input vectors are packed in a d×N RP matrix, such that each column in the RP matrix is a raw-input vector rp n . 
         [0138]    Next, in step  94 , the raw-input vectors rp n  in the RP matrix are normalized within predetermined upper and lower boundaries (preferably within the range [0.25, 0.75]), thus maintaining relative amplitudes. This normalization step may be carried out by computing 
         [0000]    
       
         
           
             
               p 
               n 
             
             = 
             
               
                 0.5 
                  
                 
                     
                 
                  
                 
                   
                     
                       rp 
                       n 
                     
                     - 
                     
                       min 
                        
                       
                         ( 
                         RP 
                         ) 
                       
                     
                   
                   
                     
                       max 
                        
                       
                         ( 
                         RP 
                         ) 
                       
                     
                     - 
                     
                       min 
                        
                       
                         ( 
                         RP 
                         ) 
                       
                     
                   
                 
               
               - 
               0.25 
             
           
         
       
     
         [0000]    for each raw-input vector rp n , where max(RP) and min(RP) are the largest and smallest elements in the raw-input matrix RP, respectively. Finally, in step  95 , the normalized vectors p n  are packed in a d×N input matrix P. The columns of the input matrix P are preferably arranged in 2 subgroups, as follows: columns 1 to N/2 are preferably populated with the input vectors of the healthy patients, and columns N/2+1 to N with the input vectors of the CD (sick) patients. 
         [0139]    After carrying out the above steps, the input matrix P is obtained, comprising normalized ECG signals p n , as illustrated in  FIG. 6 . 
       Generating the DHF Diagnosing Set 
       [0140]    In order to diagnose new patients, based on their rest-ECG recording, the DHF process of the invention employs a large set of matrices and vectors that will be referred to as the complete diagnosing set. The complete diagnosing set contains a large number of NNs, represented by real-valued weight matrices and bias vectors. These matrices and vectors are obtained through the process of NN training and test-set resampling which is discussed in details hereinafter with reference to  FIGS. 10 and 11 . 
       The 1st Training Cycle 
       [0141]    For the sake of simplicity, in the following discussion the training of a 3-layered (input, intermediate and output) NN is exemplified. Obviously, this example does not limit the NN of the invention, which may comprise any different number of intermediate layers. It should be noted that the NN of the invention is preferably implemented utilizing the logistic transfer function. 
         [0142]      FIG. 10  is a flow chart illustrating a preferred process for carrying out the first training cycle for a given ECG Lead (e.g., Lead 1, 5 or 12). The process is started in step  101  wherein a d×N input matrix P is constructed as was explained in details herein above with reference to  FIG. 9  (Each column of the P matrix is a processed signal of Lead 1, of a given patient). The corresponding 2×N ‘truth’ matrix T is constructed in step  102 , such that each 2-element column in T is either 
         [0000]    
       
         
           
             
               t 
               n 
             
             = 
             
               [ 
               
                 
                   
                     1 
                   
                 
                 
                   
                     0 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    (for healthy patient, 1≦n≦N/2) or 
         [0000]    
       
         
           
             
               t 
               n 
             
             = 
             
               [ 
               
                 
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    (for a CD patient, N/2&lt;n≦N). The weights matrices, W 1  and W 2 , and the bias vectors, b 1  and b 2 , are initialized in step  104  with small random values, as was described herein before. 
         [0143]    In step  105 , two columns of the input matrix P are randomly selected, where one belongs to a healthy patient—p h  (1≦h≦N/2), and the other belongs to a CD patient—p c  (N/2&lt;c≦N). The P and T matrices are separated in step  106  into a ‘train’ and ‘test’ sub-matrices, wherein P train  and T train  are the sub-matrices of P and T, respectively, in which the h and c columns are omitted, i.e., P train =└p 1 , . . . , p h−1 , p h+1 , . . . , p N/2 , p N/2+1 , . . . , p c−1 , p c+1 , . . . , P N ┘ and T train =└t 1 , . . . ,t h−1 ,t h+1 , . . . ,t N/2 ,t N/2+1 , . . . ,t c−1 ,t c+1 , . . . ,t N ┘, while the P test =[p h , p c ] and T test =[t h ,t c ] are composed of the h and c columns. Namely, P train  is a d×(N−2) matrix, T train  is a 2×(N−2) matrix, P test  is a d×2 matrix [p h , p c ], and T test  is a 2×2 matrix 
         [0000]    
       
         
           
             
               [ 
               
                 
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     0 
                   
                   
                     1 
                   
                 
               
               ] 
             
             . 
           
         
       
     
         [0144]    In step  107 , the network is trained using the P train  and T train  matrices according to the BP algorithm which was previously described hereinabove. When the network reaches the desired performance, i.e., Err=Σ all-signals [T n −V M ] 2 =E T , the corresponding weight matrices and bias vectors resulting from this training process e.g.: W 1   1 , W 1   2 , b 1   1 , b 1   2 , are saved in step  108 . These results comprise the first classifier, referred to herein as the classifying network #1. In step  109 , the classifying network #1 is tested for generalization, using the P test  and T test  matrices, namely: 
         [0000]        O   #1 =ƒ( W   1   2 ·ƒ( W   1   1   ·P   test   +b   1   1 )+ b   1   2 )       where f is the transfer (preferably the logistic) function.         
         [0146]    Next, in step  110 , The elements o ij  of the resulting output 
         [0000]    
       
         
           
             
               O 
               #1 
             
             = 
             
               
                 [ 
                 
                   
                     O 
                     h 
                   
                    
                   
                     O 
                     c 
                   
                 
                 ] 
               
               = 
               
                 [ 
                 
                   
                     
                       
                         o 
                         11 
                       
                     
                     
                       
                         o 
                         12 
                       
                     
                   
                   
                     
                       
                         o 
                         21 
                       
                     
                     
                       
                         o 
                         22 
                       
                     
                   
                 
                 ] 
               
             
           
         
       
     
         [0000]    are transformed into 0 and 1 values using the ceil function, as follows: o ij =ceil(o ij −0.5), where ‘ceil’ rounds its operands to the nearest largest integer (e.g., ceil(−0.3)=0, ceil(0.1)=1). This may yield one of the following four possible results, that are compared with T test : 
         [0147]    i) 
         [0000]    
       
         
           
             
               O 
               #1 
             
             = 
             
               [ 
               
                 
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     0 
                   
                   
                     1 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    i.e., classifying network #1 has correctly classified both healthy and sick test patients—100% success; 
         [0148]    ii) 
         [0000]    
       
         
           
             
               O 
               #1 
             
             = 
             
               [ 
               
                 
                   
                     1 
                   
                   
                     1 
                   
                 
                 
                   
                     0 
                   
                   
                     0 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    i.e., classifying network #1 has correctly classified only the healthy patient—50% success; 
         [0149]    iii) 
         [0000]    
       
         
           
             
               O 
               #1 
             
             = 
             
               [ 
               
                 
                   
                     0 
                   
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                   
                     1 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    i.e., classifying network #1 has correctly classified only the sick patient—50% success; 
         [0150]    iv) 
         [0000]    
       
         
           
             
               O 
               #1 
             
             = 
             
               [ 
               
                 
                   
                     0 
                   
                   
                     1 
                   
                 
                 
                   
                     1 
                   
                   
                     0 
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    i.e., classifying network #1 has failed to classify both test patients—0% success. 
       Test-Set Resampling Process 
       [0151]    The test-set resampling steps are illustrated in the flowchart of  FIG. 11 . These steps are performed further to the basic training steps which were described above, in order to initiate the DHF of the invention. In steps  113  and  114 , the first training cycle steps  104  through  110 , described above with reference to  FIG. 10 , are preferably repeated NB times 
         [0000]    
       
         
           
             
               ( 
               
                 
                   e 
                   . 
                   g 
                   . 
                 
                 , 
                 
                   NB 
                   ≈ 
                   
                     0.5 
                      
                     
                       
                         ( 
                         
                           N 
                           2 
                         
                         ) 
                       
                       2 
                     
                   
                 
               
               ) 
             
             , 
           
         
       
     
         [0000]    or until the average generalization performance of all training cycles reaches an asymptotic value (Yes- 1 , i.e., the first time one of the conditions in step  114  is satisfied). This will result in NB classifying networks that constitute a temporary diagnosing-set, e.g., for the three layered NN exemplified above the NB temporary classifying networks are: 
         [0000]    
       
         
           
               
             
               { 
               
                 
                   
                     
                       W 
                       1 
                       1 
                     
                   
                   
                     
                       W 
                       1 
                       2 
                     
                   
                   
                     
                       b 
                       1 
                       1 
                     
                   
                   
                     
                       b 
                       1 
                       2 
                     
                   
                 
                 
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                 
                 
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                 
                 
                   
                     
                       W 
                       NB 
                       1 
                     
                   
                   
                     
                       W 
                       NB 
                       2 
                     
                   
                   
                     
                       b 
                       NB 
                       1 
                     
                   
                   
                     
                       b 
                       NB 
                       2 
                     
                   
                 
               
               } 
             
           
         
       
     
         [0000]    wherein each row in the above array represents one classifying NN. 
         [0152]    In a preferred embodiment of the invention, the average generalization performance is determined utilizing a grading scheme. For each cycle (namely, each classifying network) 3 success ‘grades’ are determined: i) one grade for success in diagnosing the healthy signal (0 or 100%); ii) second grade for success in diagnosing the sick signal (0 or 100%); and iii) a general grade (both healthy and sick—0, 50 or 100%), where the average generalization performance values are actually the averages of these three grades over the currently tested classifying networks. 
         [0153]    At this point, each input p n  is examined: The ceil function transformation described above is used to compute for each input signal vector p n , the percentage of classifying networks that were successful in classifying p n , when it was used as a training input in P train . In steps  115  and  116 , the p n  vectors for which a certain percentage (e.g., 60%) of the classifying networks failed to classify during the training process are deleted. Subsequently, in step  117 , a new input matrix P* is obtained, wherein the number of inputs vectors p n  is reduced, such that the dimensions of the inputs matrix P* obtained now are d×N*, where N*&lt;N. Correspondingly, the matching 2×N* ‘truth’ output matrix T* is constructed by eliminating the corresponding truth vectors according to the deleted input vectors. 
         [0154]    The training steps performed in steps  113  and  114 , are repeated while utilizing the modified matrices P* and T*, and once completed (Yes- 2 , i.e., the second time one of the conditions in step  114  is satisfied), in step  118 , the final classifying networks obtained are saved, yielding the final diagnosing set of the trained Lead. e.g.: 
         [0000]    
       
         
           
               
             
               { 
               
                 
                   
                     
                       W 
                       1 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         1 
                       
                     
                   
                   
                     
                       W 
                       1 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         2 
                       
                     
                   
                   
                     
                       b 
                       1 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         1 
                       
                     
                   
                   
                     
                       b 
                       1 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         2 
                       
                     
                   
                 
                 
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                 
                 
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                   
                     ⋮ 
                   
                 
                 
                   
                     
                       W 
                       NB 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         1 
                       
                     
                   
                   
                     
                       W 
                       NB 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         2 
                       
                     
                   
                   
                     
                       b 
                       NB 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         1 
                       
                     
                   
                   
                     
                       b 
                       NB 
                       
                         
                           
                               
                           
                           * 
                         
                          
                         2 
                       
                     
                   
                 
               
               } 
             
           
         
       
     
         [0000]    This process (illustrated in  FIGS. 10 and 11 ) is carried out for each ECG Lead signal used by the DHF, preferably Leads: 1, 5 and 12, such that the complete diagnosing set is composed of 3 such final diagnosing sets. This complete set is employed in classifying new, unfamiliar ECG signals. 
       Classifying a New ECG Signal 
       [0155]    Classifying ECG signals of non-diagnosed patients by the DHF can now be carried out as illustrated in the flowchart of  FIG. 12 . For this purpose, the digital rest-ECG signals of a patient are recorded and maintained, preferably utilizing the signals obtained form leads 1, 5, and 12. The process starts in step  120 , wherein the ECG signal obtained from Lead 1 is filtered, preferably via the High-Pass, notch, and EMG filters which were previously described. In the following step, step  121 , a cycle segment is extracted from the filtered Lead 1 signal as was previously described with reference to  FIG. 4 , in order to obtain a new raw-input signal (column vector) rp new . 
         [0156]    In step  122 , the new raw-input signal rp new  is aligned to the same isoelectric reference value that was employed in preparing the input signal matrix P. In the normalization step  123 , normalization of the new raw-input signal rp new  is carried out within the same bounds as used in the preprocessing steps of the input vector p n  of P, namely: 
         [0000]    
       
         
           
             
               p 
               new 
             
             = 
             
               
                 0.5 
                  
                 
                   
                     
                         
                     
                      
                     
                       
                         rp 
                         new 
                       
                       - 
                       
                         min 
                          
                         
                           ( 
                           RP 
                           ) 
                         
                       
                     
                   
                   
                     
                       max 
                        
                       
                         ( 
                         RP 
                         ) 
                       
                     
                     - 
                     
                       min 
                        
                       
                         ( 
                         RP 
                         ) 
                       
                     
                   
                 
               
               - 
               
                 0.25 
                 . 
               
             
           
         
       
     
         [0000]    Then in step  124  the new input signal p new  is forward propagated through the classifying network #1 (of Lead 1), e.g., in the three-layers NN example: 
         [0000]        O=ƒ   2 ( W   1   2 ·ƒ 1 ( W   1   1   ·p   new   +b   1   1 )+ b   1   2 ) 
         [0000]    which results in an output vector 
         [0000]    
       
         
           
             O 
             = 
             
               
                 [ 
                 
                   
                     
                       
                         o 
                         1 
                       
                     
                   
                   
                     
                       
                         o 
                         2 
                       
                     
                   
                 
                 ] 
               
               . 
             
           
         
       
     
         [0157]    In step  125  the signal is classified as ‘healthy’ if o 1 &gt;0.5 and o 2 &lt;0.5, or as ‘CD’ if o 1 &lt;0.5 and o 2 &gt;0.5. In step  126 , it is checked if the new signal was classified using all the classifying networks of Lead-1, and it returns the control to step  124  until classification of the new signal is carried out with all NB classifying networks (or less if generalization average had been reached asymptotic value in the training step). Step  127  returns the control to steps  120  in order to repeat the classification process of steps  120  through  126  for the remaining ECG signals, e.g., of leads 5, 12. 
         [0158]    The final classification is based on majority decision rules, performed in two step: First, in the classification of step  128 , each of the ECG signals, of each lead, is classified independently as healthy or sick according to the classification of the majority (e.g., &gt;50%) of the NB classifying networks of the given lead. For example, if p new  of Lead 1 is classified as ‘healthy’ by more than NB/2 classifying networks, it will be classified as ‘healthy’ for that Lead. 
         [0159]    Finally, in step  129 , the signal is diagnosed according to the classifications of the majority of the leads, e.g., if the signal was classified as CD by the classification process performed with at least two of the three leads, it will be diagnosed as CD. 
       System Overview 
       [0160]      FIG. 7  is a block diagram illustrating a system, capable of carrying out the DHF of the invention. The system preferably comprises two main modules, a Training Module  700 , for instance, a computer program operating on a central server, and the Classifier Module  740  (Client&#39;s End), for instance, a computer program operating on the PC, Palm, or a dedicated diagnosing device of the client (physician, patient). 
         [0161]    The Training Module  700  operates in the background. It scans the current database  701  of diagnosed ECGs and produces the updated complete diagnosing-set matrices and vectors. Each new ECG diagnosed signal that is added to the database is processed by a signal preparation module  702 , which updates the P and T matrices maintained in  703  (e.g., the server memory). The diagnosing-set is updated by the training module  704  and maintained in  705  (e.g., server memory). 
         [0162]    The complete diagnosing-set is installed on the classifier  741 , and is updated periodically (see arrow from  705  to  741 ). Whenever a new ECG signal  745 , of a non-diagnosed patient, is obtained by the classifier  740 , it is preprocessed by the signal preparation module  742  (which is identical to module  702 ), and classified by the classification module  743 , according to the DHF of the invention. 
         [0163]    The training module  700  stores a large set of ECG recordings  701 , which are diagnosed a-priori by expert cardiologists, based on catheterization or equivalent procedure. For each cardiac disease there exists a separate database and a matching complete diagnosing set. The ECG databases are constructed such that about half of the patients are diagnosed as healthy, and the rest are sick. 
         [0164]    It should be noted that in a preferred embodiment of the invention, all ECG signals (healthy and sick) of the database are visually diagnosed as healthy, namely, the standard rule-based and visual diagnostic methods do not apply for these ECGs. In this way it is assured that tile factors extracted by the training process are the relevant hidden factors of the cardiac disease. Similarly, a mirror database should be employed, wherein all ECG signals (healthy and sick) are visually diagnosed as sick. Combining diagnosis from both databases will reduce ‘false negative’ and ‘false positive’ errors. 
         [0165]    The databases of ECG signals are processed by the signal preparation modules according to the processing steps described with reference to  FIG. 9 . The training process shown in  FIGS. 10-11  is carried out by the training module  704 , and the resulting complete diagnosing-sets, are saved, preferably on a CDROM, and/or transferred to the client via the internet, or other data storing media or data communication means. 
         [0166]    The ECG signal  745  of a new non-diagnosed patient is digitally recorded and provided to the classifier  741  that classifies the signal  745  according to the DHF classification process of the invention. If the patient is further diagnosed by catheterization ( 744 ), the ECG signals and the diagnostic results are added to the database of the training module for increasing it and improving the diagnosing-set (dashed arrows in  FIG. 7 ). 
         [0167]    The above examples and description have of course been provided only for the purpose of illustration, and are not intended to limit the invention in any way. As will be appreciated by the skilled person, the invention can be carried out in a great variety of ways, such as processing rest ECG, stress-test ECG or Holter-test ECG signals, employing techniques different from those described above, all without exceeding the scope of the invention.