# Data Analysis, Simulation and Visualization for Environmentally Safe Maritime Data
## 5 Experimental Evaluation
### Measuring Clustering Validation
The Silhouette Coefficient is defined for each sample and is composed of two scores:  
a: The mean distance between a sample and all other points in the same class. b: The mean distance between a sample and all other points in the next nearest cluster. The Silhouette Coefficient s for a single sample is then given as:  
\[SC=\frac{b-a}{max(a,b)}\]  
Three different time periods were chosen randomly, namely day, week and month. The total number of RoI for the Aegean Sea was 672, given the square size of 1 km per side. Each algorithm was tested based on predefined chosen criteria, except (a) the number of k, in k-means and in EM algorithms k was chosen to equal to 6 and (b) in DBSCAN algorithm the variable \(\varepsilon\) is replaced by a value of 1.0 and the _min_points_ was set to 5. Parameter \(\varepsilon\) specifies how close points should be to each other to be considered as part of a cluster and parameter _min_points_ specifies how many neighbors a point should have to be included into a cluster. Since the choice of such parameters plays a crucial role in the validity of clusters, we followed estimated the distance from each point to its nearest neighbor and created a histogram. By examining the value of distance units where the vast majority of points lie within provides a good estimate of the \(\varepsilon\) parameter. Consequently, for that \(\varepsilon\) value, we examined how many points lie within each point's \(\varepsilon\)-neighborhood. Again, by visually examining the histogram, we exclude the values that have too few neighbors and look for values that start having an increasing number of neighbors. Parameter _min_points_ is chosen as the value where the number of neighbors begins to grow. According to literature, the most efficient algorithm (with the best performance) is the one with the smallest absolute value of density. By executing the evaluation process, the following results were returned, tabulated on Table 1, referring to cluster density while Table 2 tabulates the Silhouette Coefficient score for the same experimental setting: \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **k-Means** & **DBSCAN** & **EM** \\ \hline _Day_ & \(-748.720\) & \(-3582.824\) & \(-1705.336\) \\ _Week_ & \(-769.273\) & \(-3701.001\) & \(-1715.009\) \\ _Month_ & \(-991.182\) & \(-3717.501\) & \(-2195.938\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Cluster Density evaluation results upon the selected clustering algorithms. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **k-Means** & **DBSCAN** & **EM** \\ \hline _Day_ & \(-748.720\) & \(-3582.824\) & \(-1705.336\) \\ _Week_ & \(-769.273\) & \(-3701.001\) & \(-1715.009\) \\ _Month_ & \(-991.182\) & \(-3717.501\) & \(-2195.938\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Silhouette Coefficient evaluation results upon the selected clustering algorithms. According to the results of Table 1, it is apparent that the algorithm with the lower average density and with almost threefold difference in clustering is the k-Means. The same trend appears on the second table as well, denoting that k-Means is the most accurate clustering model. In addition, the speed of execution of the k-Means algorithm is slightly faster of this of DBSCAN, while the EM algorithm runs more slowly. Measurements were made on a sample of three different time periods, taking into consideration all the criteria of data analysis. Additional parameters of k-Means or differentiation of k extract values quite close to those of k = 6 and we considered using more clusters for the evaluation of the sample as unnecessary.