You are on page 1of 4

Ano ang gagamitin na pang classify? Pede niyong idefine sa mismong definition..

Ano bang ibigsabihin nung K-NN then pano siya


gagamitin sa ECG mismo.. sa output

The k-Nearest-Neighbor Classifier (k-NN) works directly on the learned samples, instead of creating rules compared to other
classification methods.

The algorithm for the k-nearest neighbor classifier is among the simplest of all machine learning algorithms. k-NN is a type of instance-
based learning, or lazy learning, where the function is only approximated locally and all the computations are performed, when we do the actual
classification.

Heart attack is very common thing now-a-days. This results because of many disorders occurring in the heart. These disorders can be
found out by analysing the ECG signal. The conventional method of analysing the ECG signal is done by the doctors who are expert in that. So far
there is no systematic procedure for analysing the ECG signal. The main goal of this study is to obtain a systematic method of analysing the
Electrocardiogram (ECG) from the patient and display the types of disorder. The ECG from the patient is taken and by loop analysis every point in
the data is checked and analysed using two new methods namely the direct comparison method and kNN method. The ECG parameters such as
shape of the waveform, heart rate, time interval, amplitude (voltage) etc., are taken for analysis. kNN (K-Nearest Neighbour) algorithm is a
search algorithm which finds the nearest distance from the training data and this method is used to compare the corresponding predefined
values of different disorders of the heart with the sampled data and the inference from the comparison results are displayed. In case of multiple
disorders, the KNN finds the most prominent one. Simulation is done using MATLAB.
Several studies have followed a trial and error approach to choose the appropriate value of K, but few have determined the effective
value of K through artificial intelligence approaches. The performance of KNN classification depends on the size of the feature vector. Larger
feature vectors result in a poor classification rate for KNN. Therefore, the optimal value of the feature vector is critical for achieving good
classification accuracy
The ECG records taken from the MIT BIH arrhythmia database are sampled at 360 Hz (fs =360Hz). The maximum frequency is on the
order of 130Hz (fmax=130Hz). Therefore the range of real frequency components of the signals is between 0 and 130 Hz. Table I gives the
correspondence between DWT coefficients and range of frequencies

B. QRS Detection

Most of the energy of ECG signal is concentrated within the QRS complex. Most of the energy of the QRS complex lies between 3 Hz and
40 Hz [9]. Fig. 4 and Fig. 5 show Wavelet coefficients for scale levels 1 to 8. The small scales represent the high frequency components and large
scales represent the low frequency components. The high frequency contents of the ECG waveform is represented by Eighth level .The
decomposition level 3, 4 and 5 contain most energy of the QRS complex.
The DWT analyzes the signal at different frequency bands with different resolutions by decomposing the signal into a coarse
approximation and detailed information. DWT employs two sets of functions, called scaling functions and wavelet functions, which
are associated with low pass and high pass filters, respectively. The decomposition of the signal into different frequency bands is
simply obtained by successive high pass and low pass filtering of the time domain signal (Polikar, R. n.d).
The basic feature extraction procedure consists of:
1. Decomposing the signal using DWT into N levels using filtering and decimation to obtain the approximation and detailed
coefficients
2. Extracting the features from the DWT coefficients
The features extracted from the Discrete wavelet transform (DWT) coefficients of ultrasonic test signals are considered
useful features for input into classifiers due to their effective timefrequency representation of non-stationary signals.