## 2 Materials and Methods
### Learning Phase
#### 2.3.2 Feature Selection and Establishment of Classifiers  
1. Feature Selection  
Feature selection is the most difficult problem due to the similarities or symmetries between the retinal RoIs--_OD_ and _EX_ (color and segmented shapes) or _EX_ and _HE_ (segmented shapes). It is done in the learning phase by the means of confusion matrices (_CM_s), calculated for each feature from the previous set and for each color component. _CM_s (Figure 5) are computed by considering sets of 10 manually selected images (boxes) for each class--_OD_, _MA_, _EX_, _HE_, and _NR_. In _CM_, _ODa_ represents the total number of actual boxes which contain _OD_, _MAa_ represents the total number of actual boxes which contain _MA_, and so on. Similarly, _ODp_ represents the total number of predicted boxes which contain _OD_, _MAp_ represents the total number of predicted boxes which contain _MA_, and so on. _OD/OD_ represents the total number of boxes which contain the _OD_ and were correctly predicted. Similarly, _MA_/_MA_ represents the total number of boxes which contain the _MA_ and were correctly predicted, _OD_/_MA_ represents the number of boxes containing _OD_ classified as _MA_, and so on. _tr_ is the total \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Mean Intensity** & \(Im=\frac{1}{\lambda!\cdot\!\lambda!}\sum\limits_{i=1}^{\frac{M}{\lambda!}}\frac{M}{ \lambda!}\,I(i,j)\) & **Contrast** & \(Con_{d}=\frac{\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}}(i-j)^{2}C_{d}(i,j)\) \\ \hline
**Entropy** & \(Ent_{d}=-\frac{K}{\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}}C_{d}(i,j)\cdot \log_{2}[C_{d}(i,j)]\) & **Energy** & \(Ent_{d}=\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}C_{d}(i,j)^{2}\) \\ \hline
**Homogeneity** & \(Hom_{d}=\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}\frac{C_{d}(i,j)}{\prod_{i =1}^{K}\prod_{i=1}^{K}}\) & **Correlation** & \(Cor_{d}=\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}\frac{i\cdot jC_{d}(i,j)- \mu_{i}-\mu_{i}}{\mu_{i}\mu_{i}}\) \\ \hline
**Variance** & \(Var_{d}=\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}(i-\mu)^{2}\cdot C_{d}(i,j)\) & **Local Binary** & \(H=[H_{0},H_{1},\ldots,H_{n-1}]\) \\ \hline
**Differential** & \(DFD=\frac{\log\left(\sum\limits_{i=1}^{K}n(\mu,\
u)\right)}{\log r}\) & **Lacunarity** & \(L(r)=\frac{\sum\limits_{i=1}^{K}N^{2}\cdot P(N\
u)}{\left[\sum\limits_{i=1}^{K }N\cdot P(N\
u)\right]}\), \(N=\frac{\sum\limits_{i=1}^{K}\sum\limits_{j=1}^{K}n(\mu,\
u)}{\sum\limits_{i=1 }^{K}N\cdot P(N\
u)}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Feature set (candidate features, CF) for learning phase. number of boxes correctly classified, meaning the trace of _CM_. In order to select a feature as efficient for the classification process, the trace of _CM_ is computed (Equation (6)). \[tr(CM)=OD/OD+MA/MA+EX/EX+HE/HE+NR/NR\] Using the concept of the confusion matrix (Figure 5), three selection criteria are used:
* If \(tr(CM)\geq 0.75\cdot Total\), where _Total_ (Equation (7)) represents the number of boxes considered, then the tested feature is a relevant one and it is kept; generally, this feature can be used for more RoIs. \[Total=OD_{a}+MA_{a}+EX_{a}+HE_{a}+NR_{a}\] (7) In our case, _Total_ = 50. * To include a feature into the set of selected features for the class \(C^{i}\), the corresponding value \(C^{i}/C^{i}\) from its _CM_ must be higher than \(0.75C^{i}a\), where \(C^{i}a\) represents the total boxes containing \(C^{i}\) used in the learning phase, Task 2 (_LS2_)--in our case, \(C^{i}a=10\). These criteria act as the performance evaluation, in order to select the most efficient features from a given set of features. * If the distance (Minkowski of order 1 [60]) between two _CM_s (corresponding to two features) is low, then one of the features can be rejected as redundant.