Skip to content

sara2227/EEG-Feature-Extraction-using-WaveletTransform

Repository files navigation

EEG-Feature-Extraction-using-WaveletTransform

This repository is related to feature extraction of Electroencephalogram(EEG) signals using db4 Wavelet Coefficients in 5 levels. First, we convert .mat files to CSV and then processed them using pandas. In our case, each sample has 4 Matlab files. Each files includes all signals from 21 channels {'Fp1','Fp2','F3','F4','C3','C4','P3','P4','O1','O2','F7','F8','T3','T4','T5','T6','Cz','Fz','Pz','A1','A2'} that are in one row so we need to divide each row based on the length/21 to get data of each specific channel. Then, first, we passed each channel to wavelet definition to get the wavelet's coefficients, and second we calculated the average of energy, entropy, std, and an average of details and approximation. So we have 8 features for each channel(8*21) including cD_Energy, cA_Energy, D_Entropy, A_Entropy, D_mean, A_mean, D_std, and A_std. Finally, we saved the extracted features in the CSV file then we run three ML algorithms on them and compared them to each other. Another useful preprocessing in EEG signal processing is feature selection because we need to select more significant channels. We used ExtraTreeClassifier and SelectKBest algorithms in Scikit-learn and retrain our models and got better results.

Releases

No releases published

Packages

No packages published