# Emotion Recognition: An Evaluation of ERP Features Acquired from Frontal EEG Electrodes
## 5 Preprocessing Operations on EEG and Feature Selection  
The offline filtering operations have been performed on EEG signals. The filtering operations are also influenced by the study that showcased the highest results obtained when using ERPs as attributes [22]. To remove the interfering power noise, a notch filter has been used to remove power noise of 50 Hz. To obtain the EEG signals in a frequency range of 0.5 to 40 Hz, an IIR low pass filter with a cut off frequency of 40 Hz and an IIR high pass filter with a cut off frequency of 0.5 Hz have been used. The subjects were advised to not move or blink their eyes during the presentation of a stimulus. We, in fact, showed to them how the EEG varied due to the blinking of eyes. The subjects remained attentive during the stimulus presentation and moved or blinked their eyes in the span of 1.5 s during the presentation of a cross symbol. The filtering operations as well as feature extraction procedure have been performed using Acq4.2 software provided by Biopac. The EEG signals belonging to a particular class of emotion were then collected as per the SAM ratings and averaging of the signals was done. In our case, the stimulus presentation was for 1 second, so the EEG signals of length 1 second corresponding to each stimulus (of a particular class other than rejected by a subject) were collected and averaged. In this manner, we obtained one EEG signal per electrode (for one subject) for a particular class of emotion. The 12 ERP attributes (six ERPs and six corresponding latencies), namely, P100, N100, PT100, NT100, P200, N200, PT200, NT200, P300, N300, PT300 and NT 300, as specified in Table 2 were then extracted from EEG. These ERP and latency attributes were acquired from each of the frontal electrodes--Fp1, Fp2, F3, F4, F8 and Fz. The analysis has also been performed on the difference of ERPs and absolute latencies, as shown in Table 3.  
The SVM polynomial classifier with 10 fold cross-validation has been used for the classification of emotions along arousal and valence domains considering the orthogonality of arousal and valence. The SVM polynomial kernel in Matlab has been used to classify emotions. The training and testing can be performed in Matlab by using the instructions:  
Svmtrainarousal = svmtrain(z1(trainindex,:), trainoutputarousal(trainindex), 'Autoscale, true, 'Showplot', false, 'Kernel Function', 'polynomial', 'polyorder', s, 'Boxconstraint',bestc, 'QUADPROG_OPTS',options); and testoutput = svmclassify(svmtrainarousal, w1,'showplot', false);  
Figure 4: IAPS and assessed mean ratings on arousal and valence scale. The cross-validation is used in a machine learning model to obtain a less biased or less optimistic estimate of the model as compared to a direct train-test operation. The training data are split into k subsets (in this study k = 10) and a classifier model developed on k-1 subsets is tested on the kth subset. This process is repeated and average accuracy is obtained for a chosen value of 'C'. If the average accuracy is greater than the best accuracy, that value of 'C' is retained as best 'C'. The best 'C' value thus determined is used for training on the full training set and then the classifier is tested on the test set. The results presented in this manuscript have been obtained after performing 10-fold cross-validation on the training data. For the emotion classifier based on average ERP attributes, these 12 ERP attributes shown in Table 2 have been used. In the second analysis, i.e., the development of an emotion classifier based on the difference of ERP attributes, we used differential ERP attributes such as (P100-N100), (P200-N200), (P300-N300) and the latencies PT100, NT100, PT200, PT300 and NT300 as attributes. The attribute selection is performed by testing different combinations of acquired features. All the initial features say the differences of ERPs and latencies (P100-N100, P200-N200, P300-N300, PT100, NT100, PT200, NT200, PT300, NT300) are initially selected for training a classifier.