# A Novel Tool for Biodiversity Studies: Earthworm Classification via NGS and Neural Networks
## 3 Results and Discussion  
The average accuracies of the classification of earthworms _Eisenia fetida_, _Dendrobena_ ssp., and _Lumbricus terrestris_ performed based on selected texture parameters from images in color channels R, G, B, L, a, b, X, Y, Z, U, V, and S using machine learning algorithms from the groups of Bayes, Functions, Lazy, and Trees were high reaching 100% for Logistic from Functions (Table 1). Each group was correctly classified in 100% for both models. The Kappa statistic was equal to 1.000. In the case of models built using Naive Bayes and Random Forest, the average accuracy was 99%, and the Kappa statistic reached 0.9833. Earthquorms, _Lumbricus terrestris_, were distinguished from others in 100%. Whereas the misclassification occurred between _Eisenia fetida_ and _Dendrobaena_ spp. In the case of Naive Bayes, 3% of cases of Eisenia fetida were incorrectly classified as _Dendrobaena_ ssp. For Ran-dom Forest, 3% of cases of _Dendrobaena_ ssp. were incorrectly included in the predicted class of _Eisenia fetida_. In the case of other considered algorithms, slightly lower average accuracies were obtained, 97% for Simple Logistic and 94% for KStar. Comparing the training time taken to build the model, for each model, this time was short, as: 0.01 s for Naive Bayes, 0.01 s for Logistic, 0.09 s for Simple Logistic, 0.01 s for KStar, and 0.03 s for Random Forest. The level of misclassification was very low for each model, as follows: 1% for Naive Bayes, 0% for Logistic, 3% for Simple Logistic, 6% for KStar, and 1% for Random Forest. The values of TP Rate, Precision, F-Measure, MCC, ROC Area, and PRC Area of 1.000 and FP Rate equal to 0.000 for each class of earthworms _Eisenia fetida_, _Dendrobaena_ ssp., and _Lumbricus terrestris_ for a model built using Logistic confirmed the most correct classification (Table 2). The same values for all parameters were also obtained in the case of _Lumbricus terrestris_ for models built using Naive Bayes, Simple Logistic, and Random Forest. \begin{table}
\begin{tabular}{c} _Lumbricus_ \\ _terrestris_ \\ \end{tabular} & & & & \\ \hline \end{tabular}
\end{table} 
Table 1: The results of earthworm classification based on selected image textures using machine learning algorithms from different groups. The confusion matrices of the earthworm classification using MATLAB are presented in Figure 4. In the case of the model developed using SVM (Figure 4a), the overall accuracy was equal to 99%. _Dendrobaena_ ssp. and _Lumbricus terrestris_ were correctly classified with an accuracy of 100%. Whereas the accuracy for _Eisenia fetida_ was 97%, and 3% were misclassified as _Dendrobaena_ ssp. Also, the model built using KNN (Figure 4b) allowed for the earthworm classification with an overall accuracy of 99.00%. In this case, _Eisenia fetida_ and _Lumbricus terrestris_ were completely correctly classified (100%), and earthworms belonging to _Dendrobaena_ ssp. were distinguished from other classes with an accuracy of 97%. The remaining 3% of the actual class _Dendrobaena_ ssp. were incorrectly classified as _Eisenia fetida_. For models built using Ensemble (Figure 4c) and Narrow Neural Network (Figure 4d), the overall accuracy was equal to 100%, and all earthworm groups, _Eisenia fetida_, _Dendrobaena_ ssp., and _Lumbricus terrestris_, were correctly classified. The training times were: 4.94 s for SVM, 3.15 s for KNN, 7.68 s for Ensemble, and 6.54 s for Narrow Neural Network. The misclassification rates were: 1% for SVM, 1% for KNN, 0% for Ensemble, and 0% for Narrow Neural Network (Figure 5).