# Convolutional Neural Network for Measurement of Suspended Solids and Turbidity
## 3 Results and Discussion  
This section shows the results of the evaluation of CNN's performance metrics. The CNN model was independently trained four times; in each training we used a color training dataset (white, red, green, and blue datasets). In addition, the efficiency of the MLR was evaluated to estimate the TSS and turbidity values. The validation dataset that was used consisted of nine classes for each color with 100 images in each class. For the CNN evaluation, a confusion matrix was implemented in which the rows are related to the true labels and the columns to the labels predicted by the CNN. Diagonal cells are linked to observations that are correctly classified. A perfect classification is reached when each space of the diagonal elements counts 100. The confusion matrix obtained at the end of the training process for the four color datasets was the same for fish feed and paprika (no extra classes) and is shown in Figure 8. If we visualize the extra classes in the confusion matrix, the diagonal also has 100 elements. The success of this classification may be due both to the size of the dataset (which is relatively large) and to the lack of complexity of the classification objects. In addition, since the MLR evaluation metrics had a percentage of error, we can guarantee that the CNN did not memorize the dataset and was not overfitted. The trained CNN for each color dataset reached a maximum score on its performance evaluation metrics for accuracy, precision, recall, F-score, and ROC (see Figure 9). The performance obtained for the trained CNN for each color dataset is shown in Table 3.  
Although the trained CNN achieved the same high score on the CNN performance metrics for each color dataset, it should be noted that the training time was different for each color dataset. The best training time was reached using the white light dataset. On the other hand, the worst training time was obtained using the green dataset. The difference between the CNNs trained with the white and green databases was 266% in training time. The CNN trained with the red dataset was the second-best model, which reached the maximum score in almost double the amount of time in comparison to the white one. These differences could be attributed to the fact that the CNN creates individual feature maps for each RGB color channel [39]. Therefore, the white color, which is the combination of the three color channels, could generate more detailed feature maps using the three color channels, which could allow the CNN to classify all classes more effectively. Training time is a parameter that gives us information about which color dataset is best categorized by the CNN. Once the CNN has been trained, when entering a new image, it calculates its TSS and turbidity values in fractions of a second. The accuracy and loss curves in the training process are  
Figure 8: Confusion matrix reached for all colors. shown in Figure 10. It is easy to see that the blue classifier (CNN model trained with the blue dataset) was the first to achieve a high accuracy score; however, its training process started with a low accuracy value of 42% in its first epoch, and only reached 100% accuracy at the 15 th epoch. Another important aspect concerns the green classifier, which started with the lowest accuracy score of 12%, and reached a high accuracy value at the 12 th epoch, but continued its training process with some fluctuations. The red classifier started with a low accuracy value of 45% in its first epoch, and reached 100% accuracy at the 12 th epoch. Meanwhile, the white classifier obtained an accuracy value of 90% in its first epoch, and obtained an accuracy of 100% in its seventh one. Differences between RGB colors in terms of accuracy and loss curves can be related to the spectral characteristics of the light. In particular, the sample was a brown color for  
Figure 10: (**a**) Classifier training accuracy for each validation color dataset. (**b**) Loss for each validation color dataset.