Research Article

Automatic Epileptic Seizure Detection Using PSO-Based Feature Selection and Multilevel Spectral Analysis for EEG Signals

Algorithm 1

The proposed PSO-based feature selection algorithm for seizure detection
Parameters:
: population size;
: the number of patients;
: -fold cross-validation;
: max iteration of the PSO;
for in : do
for in : do
  Data partitioning according to feature vectors of:
  , , and represent the training, validation, and test sets, respectively;
  Initialization population: Initialize position and velocity of each particle within permissible range;
  while t do
   for in : do
    Conduct 10-fold cross-validation on , and calculate average accuracy ;
    Evaluate the classification accuracy on ;
    Compute fitness according to (11);
    Update and optimum of ;
    Update the velocity and position of the particle ;
    Observe the , when the iteration achieves the best validation accuracy, the training will stop;
   Retrain and build the classifier on based on the selected feature subset;
   Measure test accuracy on the test set via the trained classifier;
  Select the feature subset with best test accuracy ;
Output: Optimal feature set;