# Exudates as Landmarks Identified through FCM Clustering in Retinal Images
## 3 Proposed Methodology
### FCM Clustering  
FCM is considered an overlapping unsupervised clustering algorithm; a pixel can belong to more than one cluster at the same time, with different degrees of membership. For instance, referring to Figure 8, which represents a membership function of a variable input, notice that those values belonging to the intervals [\(a\), \(b\)] and [\(c\), \(d\)] had a corresponding membership of 1 and 0, respectively, consequently belonging to clusters \(C_{1}\) and \(C_{2}\), in order. While those input values belong to the open interval (\(b\), \(c\)), their membership value will range between 0 and 1, hence belonging to the two clusters in such a way the sum of the two memberships will always sum up to 1. Depending on the extracted features, FCM automatically specifies the suggested exudates, whether they are really exudates or not, and it assigns each pixel to the closest cluster under similarity measures' constraints [25]. To clarify both the statistical basis and the structure on which the FCM depends, suppose that \(i\) represents a pixel of an expected exudate; then all computed features are to be arranged into a vector (\(z_{i}\)). The whole set of such vectors constitutes the input data matrix:  
\[\mathbf{Z}=[z_{1},z_{2},\ldots,z_{N}],\quad z_{i}\in\mathbb{R}^{n}\]  
Figure 8: The membership function of a two-cluster fuzzy variable. Figure 7: Expected exudates: hue channel (**a**), std_intensity (**b**), std_y (**c**), and entropy (**d**). where \(N\) and \(n\) represent the number of data points and the length of the vectors, respectively. Let \(U\) be the membership matrix (\(\mu_{ij}\in[0,1]\)) which can be defined as a fuzzy partition matrix of \(\mathbf{Z}\):  
\[\mathbf{U}=[\mu_{ij}]\in M_{fc}\]  
where \(M_{fc}\) denotes the fuzzy c-partitions of a sample of \(N\) observations in \(\mathbb{R}^{n}\). Let \(\mathbf{V}\) be the cluster center matrix:  
\[\mathbf{V}=[v_{1},v_{2},\ldots,v_{c}],\quad v_{i}\in\mathbb{R}^{n}\]  
where \(c\) and \(v_{i}\) are the number of clusters and the \(i\)-th cluster center vector. An optimized solution is reached if the distance of the feature's vectors, \(\mathbf{Z}\), to the cluster center, \(\mathbf{V}\), is minimal. This distance is mathematically modeled as [14]:  
\[\mathbf{J}(\mathbf{Z};\ \mathbf{U},\ \mathbf{V})=\sum_{i=1}^{N}\sum_{j=1}^{c}{(\mu_{ij})^{m}} \|z_{i}-v_{j}\|^{2} \tag{1}\]  
where \(m\in[1,\ \infty)\) is the fuzziness parameter. This objective function is called the C-means functional. The Lagrange multipliers technique is used to optimize the nonlinear objective function, \(\mathbf{J}\), to cluster the data, and FCM can be summarized as follows. * Step 1: Initialize the fuzzy membership matrix. \[\mathbf{U}=\big{[}\mu_{ij}\big{]};\quad\Big{(}\mathbf{U}^{(0)}\Big{)}\] by substituting random numbers in the range between 0 to 1 subject to the following: \[\sum_{j=1}^{c}\mu_{ij}=1\quad\forall i\]
* Step 2: At iteration \(k\), compute the center vectors. \[ \begin{array}{l}V^{(k)}=\big{[}v_{j}\big{]}\\ v_{j}=\frac{\sum_{i=1}^{N}{(\mu_{ij})^{2}}z_{i}}{\sum_{i=1}^{N}{(\mu_{ij})}^{2} }\end{array} \] (2) According to Equation (2), we have the following: \[\mu_{ij}=\left[\sum_{k=1}^{c}{\left(\frac{\|z_{i}-v_{j}\|}{\|z_{i}-v_{k}\|} \right)^{2}}\right]^{-1}\] (3)
* Step 3: Update matrix \(\mathbf{U}^{(k)}\) to obtain \(\mathbf{U}^{(k+1)}\) by using Equation (3). * Step 4: Compute the objective function, \(\mathbf{J}\), through Equation (1). If the element-wise difference, \(d\), between \(\mathbf{U}^{(k+1)}\) and \(\mathbf{U}^{(k)}\) is less than or equal to \(\varepsilon\), \[d=\max_{ij}\Bigl{\{}\Bigl{|}{\mu_{ij}}^{(k+1)}-{\mu_{ij}}^{(k)}\Bigr{|}\Bigr{\}} <\varepsilon,\] (4) then stop the procedure and return the value of the objective function \(\mathbf{J}\) (see Equation (1)); otherwise, go back to step 2. It is common to define the maximum allowed number of iterations to be limited to a previously defined value, such that either condition (4) is fulfilled, or the number of iterations is reached, which is satisfied first.