# A Study of EEG Feature Complexity in Epileptic Seizure Prediction
## 2 Materials and Methods
### Complexity Metrics for Pre-Ictal and Inter-Ictal Feature Classification  
Data complexity analysis often has the goal to get some insight into the level of discrimination performance that can be achieved by classifiers taking into consideration intrinsic difficulties in the data. Ref. [19] observed that the difficulty of a classification problem arises from the presence of different sources of complexity: (1) the class ambiguity which describes the issue of non-distinguishable classes due to an intrinsic ambiguity or insufficient discriminant features [39], (2) the sample sparsity and feature space dimensionality expressing the impact of the number and representativeness of training set on the model's generalization capacity [18], and (3) the boundary complexity defined by the Kolmogorov complexity [40; 41] of the class decision boundary minimizing the Bayes error. Since the Kolmogorov complexity measuring the length of the shortest program describing the class boundary is claimed to be uncountable [42], various geometrical complexity measures have been deployed to outline the decision region [43]. Among the several types of complexity measures, the geometrical complexity is the most explored and used for complexity assessment [44; 45; 46]. Thus, for each individual extracted feature, we evaluate the geometrical complexity measures of overlaps in feature values from different classes, inspecting the efficiency of a single feature to distinguish between the inter-ictal and the pre-ictal states. We considered the following feature complexity metrics:  
* Fisher discriminant ratio, F1: quantifying the separability capability between the classes. It is given by: \[F1_{i}=\frac{(\mu_{i1}-\mu_{i2})^{2}}{\sigma_{i1}^{2}+\sigma_{i2}^{2}},\] (1) where \(\mu_{i1}\), \(\mu_{i2}\), and \(\sigma_{i1}^{2}\), \(\sigma_{i2}^{2}\) are the means and variances of the attribute \(i\) for each of the two classes: inter-ictal and pre-ictal, respectively. The larger the value of F1 is, the wider the margin between classes and smaller variance within classes are, such that a high value presents a low complexity problem.  
Volume of overlap region, F2: measuring the width of the entire interval encompassing the two classes. It is denoted by: \[F2_{i}=\frac{min(max_{i1},max_{i2})-max(min_{i1},min_{i2})}{max(max_{i1},max_{i2})- min(min_{i1},min_{i2})},\] (2) where \(max_{i1}\), \(max_{i2}\), \(min_{i1}\), \(min_{i2}\) are the maximums and minimums values of the feature \(i\) for the two classes, respectively. F2 is zero if the two classes are disjoint. A low value of F2 would correspond to small amount of the overlap among the classes indicating a simple classification problem.
* Individual feature efficiency, F3: describing how much an attribute contribute to distinguish between the two classes. It is defined by: \[F3_{i}=\frac{|fi\in[min(max_{i1},max_{i2}),max(min_{i1},min_{i2})]|}{n},\] (3) where \(max_{i1}\), \(max_{i2}\), \(min_{i1}\), \(min_{i2}\) are the maximums and minimums of the attribute \(i\) for each of the two classes, respectively, and \(n\) is the total number of samples in both classes. A high value of F3 refer to a good separability between the classes.