# A Novel Approach for Emotion Recognition Based on EEG Signal Using Deep Learning
## 4 Application Results and Discussion
The fact that learning could be easier and faster led us to focus on BiLSTM in this study. In addition, keeping and using past information is one of the biggest advantages of BiLSTM. Due to these advantages, BiLSTM was used in this study. If a classification model typically contains at most one or two layers of non-linear feature transformations, it is considered as shallow architecture [53, 54, 55]. We used a three-layer BiLSTM unit so that the model we designed was not shallow. In this study, a deep BiLSTM (DeepBiLSTM) architecture is designed using the BiLSTM architecture. The developed DeepBiLSTM architecture was created by combining three consecutive BiLSTM architectures and the parameters of the developed DeepBiLSTM model are given below:* A total of 1568 (14 \(\times\) 28 \(\times\) 4) pieces of 4704 (14 \(\times\) 3 \(\times\) 28 \(\times\) 4) sample length EEG signals were used in the input layer. Above, 14 refers to the number of EEG channels, 28 refers to the number of subjects, 3 indicates the collected statistical features, and 4 represents the zones of the arousal-valence plane. * 256-unit BiLSTM was used in the second layer. ReLU (rectified linear unit) was preferred as the activation function. * BiLSTM with 128 units was preferred for the third layer. As in the previous layer, ReLU is employed as the activation function in this layer. * A total of 64 BiLSTM units were used in the fourth layer. As with the previous two layers, ReLU was used as the activation function. * Then, flattening was carried out so that all data were one-dimensional. * After flattening, batch normalization has been performed so that all data are in the same range (between 0 and 1). * Then, dropout was conducted to prevent excessive learning and overfitting and 15% of the neurons were removed from the architecture. * Two fully connected layers were considered. While 512 neurons were used in the first fully connected layer, the number of neurons was reduced to 256 in the second fully connected layer. * In the last layer, a classification process was made. Two neurons were used in the last layer for binary-class classification. For the multi-class classification process, in the last layer, 4 neurons were used as the number of classes is 4. * For the binary-class classification process, Sigmoid is used as the activation function in the classification layer and Softmax is used as the activation function in multi-class classification. * The error of the model is determined by the binary cross-entropy function for binary class classification. In the multi-class classification process, the error of the model is determined by categorical cross-entropy. * The Adam function was used for optimization in both classification processes. The learning rate of Adam function was defined as 0.001 and the decay value was 0.00001. * The number of epochs of the model was determined as 250. * Validation of the model was carried out with 10-fold cross-validation. * All these parameters were determined by a trial-and-error approach. In addition to these, the parameters of SVM, RF and KNN algorithms were determined as follows. As in the DeepBiLSTM, the parameters in these classifiers were determined by trial-and-error approach. The parameters of the SVM classifier are as follows:  
* Linear kernel was used as the kernel of the model for binary-classification. For multi-class classification purpose, GRB (Gaussian Radial Basis) kernel was applied. * Size of the margin value (C) is defined as 1.5. * The parameters of the RF classifier are as follows:
* The maximum depth of the model was determined as 25. * A total of 500 estimators were used. * The parameters of the KNN classifier are defined as:
* In total, three neighbors were used and the distance between neighbors was calculated with Euclid. * The weight of the model was determined by the 'distance' parameter. * Brute was used for the algorithm of the model. * The value of 20 was taken into account as the leaf size. The performance of the classifiers is determined by accuracy and ROC.