**4. Results**

90 Practical Applications in Biomedical Engineering

background.

**Figure 11.** Analysis representation of the epochs of 1s signal and the event peak.

**Figure 12.** Demonstration of the Wavelet filter with the four obtained Wavelet functions, showing all epileptiform events after processing with the filter, contrasting with the original signals in the

### **4.1. Evaluation of the selected wavelet functions**

This section presents the results obtained with the evaluation of the Wavelet functions best suited for use with the proposed filter. The experiments consisted of applying the set of epileptiform events and calculate the correlations and RMSE between the individual peaks of the original and filtered epileptiform events, between original events and the filtered events and between the original epochs and filtered epochs. The results were grouped into tables, which show the obtained values for each category analyzed.

### *4.1.1. Results obtained through the calculation of the correlations*

Table 2 shows the results of the correlation between the peaks of the original events and the peaks of the filtered events, where the function RBio2.8 had the highest correlation value.


**Table 2.** Correlation between the peaks of the original events and the filtered events.

Table 3 shows the obtained values through the calculation of the correlations between the original events and filtered epileptiform events. The function DB4 showed the highest value for average correlation between the original events and the filtered events.



Wavelet Filter to Attenuate the Background Activity and

High Frequencies in EEG Signals Applied in the Automatic Identification of Epileptiform Events 93

Wavelet function Coefficients Energy [%] RMSE between the peaks

**Table 5.** RMSE values between the peaks of the original events and the peaks of the filtered events.

Wavelet function Coefficients Energy [%] RMSE between the events

Table 7 presents the values obtained with the analysis of the epochs of 1 sec of the original signals and the epochs of 1 sec of the filtered signals. The function that showed the lowest

Wavelet function Coefficients Energy [%] RMSE between the epochs 1 sec

db4 8 48.30 36.799603 coif5 30 76.53 37.957277 coif4 24 74.03 38.034667 sym7 14 67.69 38.061023 db8 16 59.38 38.129404 rbio1.3 6 55.36 38.243990 sym4 8 59.07 38.353757 coif3 18 70.16 38.511218 db15 30 67.40 38.828296 db11 22 64.09 38.835923

**Table 7.** RMSE values between the original epochs of 1 sec and the filtered epochs of 1 sec.

db4 8 48.30 37.659730 sym7 14 67.69 38.648321 db8 16 59.38 38.897637 coif5 30 76.53 39.530448 db12 24 65.23 39.739856 rbio1.3 6 55.36 40.126242 coif4 24 74.03 40.473673 bior3.1 4 89.57 40.847805 db15 30 67.40 41.935201 coif3 18 70.16 42.023981 **Table 6.** RMSE values between the original events (spike-wave) and the filtered events.

error was the function DB4.

coif4 24 74.03 30.496005 coif5 30 76.53 31.265593 coif3 18 70.16 31.537512 db4 8 48.30 31.725582 db15 30 67.40 31.763431 db11 22 64.09 31.833546 sym12 24 77.45 31.937828 sym4 8 59.07 32.571695 sym10 20 75.18 32.621571 db7 14 56.47 32.666603

**Table 3.** Correlation between the original events and the filtered events.

Table 4 presents the values obtained by calculating the average correlation between the epoch of the original signal and the epoch of the filtered signal. Again the function DB4 showed the highest correlation between the original signal and the filtered signal.


**Table 4.** Correlation between the original epochs and the filtered epochs.

Through use of the correlation index as a measure of the distortion of the signals processed morphologies, it was the two Wavelet functions. The function RBio2.8 stood out because it had the highest correlation value in the evaluation of the peaks (spikes) of epileptiform events. The function DB4 obtained the highest values of correlation in the evaluation of the events (spike-wave), and in the evaluation of the epochs.

#### *4.1.2. Results obtained from the RMSE*

Table 5 shows the RMSE values calculated between the peaks of the original epileptiform events and the peaks of the filtered epileptiform events. In this experiment the function that had the lowest error value was the function Coif4.

Table 6 presents the RMSE values obtained calculed between the original events (spike-wave) and the filtered events. The Wavelet function that had the lowest error value was the DB4.

Wavelet Filter to Attenuate the Background Activity and


High Frequencies in EEG Signals Applied in the Automatic Identification of Epileptiform Events 93

92 Practical Applications in Biomedical Engineering

Wavelet function Coefficients Energy [%] Correlation between the events

Table 4 presents the values obtained by calculating the average correlation between the epoch of the original signal and the epoch of the filtered signal. Again the function DB4

Wavelet function Coefficients Energy [%] Correlation between the epocs 1 sec

Through use of the correlation index as a measure of the distortion of the signals processed morphologies, it was the two Wavelet functions. The function RBio2.8 stood out because it had the highest correlation value in the evaluation of the peaks (spikes) of epileptiform events. The function DB4 obtained the highest values of correlation in the evaluation of the

Table 5 shows the RMSE values calculated between the peaks of the original epileptiform events and the peaks of the filtered epileptiform events. In this experiment the function that

Table 6 presents the RMSE values obtained calculed between the original events (spike-wave) and the filtered events. The Wavelet function that had the lowest error value was the DB4.

showed the highest correlation between the original signal and the filtered signal.

db4 8 48.30 0.717658 coif5 30 76.53 0.693210 sym7 14 67.69 0.692088 coif4 24 74.03 0.690788 rbio1.3 6 55.36 0.690375 db8 16 59.38 0.690320 sym4 8 59.07 0.682411 coif3 18 70.16 0.679416 db12 24 65.23 0.675012 db15 30 67.40 0.673080 **Table 4.** Correlation between the original epochs and the filtered epochs.

events (spike-wave), and in the evaluation of the epochs.

had the lowest error value was the function Coif4.

*4.1.2. Results obtained from the RMSE* 

db4 8 48.30 0.833480 sym7 14 67.69 0.824208 db8 16 59.38 0.820907 db12 24 65.23 0.812157 coif5 30 76.53 0.810064 rbio1.3 6 55.36 0.803467 coif4 24 74.03 0.795365 bior3.1 4 89.57 0.779477 db15 30 67.40 0.775226 coif3 18 70.16 0.771351 **Table 3.** Correlation between the original events and the filtered events.

**Table 5.** RMSE values between the peaks of the original events and the peaks of the filtered events.


**Table 6.** RMSE values between the original events (spike-wave) and the filtered events.

Table 7 presents the values obtained with the analysis of the epochs of 1 sec of the original signals and the epochs of 1 sec of the filtered signals. The function that showed the lowest error was the function DB4.


**Table 7.** RMSE values between the original epochs of 1 sec and the filtered epochs of 1 sec.

The experiments showed the function DB4 proved to be the best choice for use with the filter, according to the values of correlation and RMSE. This function is indicated when there is the need to maintain the morphology of the whole epoch of the filtered signal. When there is the need to preserve only the peaks of the filtered signal the RBio2.8 and Coif4 are the Wavelet functions more suitable for this task. If is only necessary to attenuate the normal background activity of the EEG, without concern for preserving the morphology of the epoch the Wavelet function Bior3.1 is the most appropriate to do this. Because this particular function have few coefficients, their use in filtering the EEG signals offers superior performance to other functions presented. However, this function shows greater distortion of the signal after filtering than the others. Table 8 shows the values of correlation and RMSE for a epoch of 1 sec.

Wavelet Filter to Attenuate the Background Activity and

High Frequencies in EEG Signals Applied in the Automatic Identification of Epileptiform Events 95

Figure 14 shows a segment of the EEG signal which has large fluctuations of base line. It can be observed that the proposed filter attenuated the baseline oscillations and small oscillations of low frequencies apparent at the beginning of the original signal were also

Figure 15 presents a segment of the EEG signal containing high frequency noise and the

Figure 16 presents a segment of EEG containing epileptiform events and small lowfrequency oscillations. Can be observed that the low-frequency oscillations were attenuated

attenuated.

**Figure 14.** EEG signal containing base line oscillations.

**Figure 15.** EEG signal containing noise of high frequency.

**Figure 16.** EEG signal containing some epileptiform events.

highlighting the epileptiform events.

filtered signal by Wavelet filter.


**Table 8.** Wavelet functions obtained from the experiments performed with the calculation of the correlations and RMSE.
