# An Evolutionary Neural Network Approach for Slopes Stability Assessment
## 3 Methodology
### Model Evaluation  
When handling unbalanced multi-class datasets (such as our EHC case), single classification measures can result in misleading predicted values. For instance, if there are four classes, \"A\", \"B\", \"C\", and \"D\", where 95% of the examples are related to class \"A\", then a classifier with a 95% classification accuracy might correspond to a \"dumb\" predictor that always outputs the \"A\" class. Thus, in this work, rather than assuming a single measure, we computed performance measures for all four EHC classes.  
When evaluating the prediction quality for a particular class, there are two types of errors, false positives and false negatives, each of which correspond to different costs (specific to the domain problem). In order to better measure the prediction performance for each of the four EHC classes, rather than focusing on one type of error (e.g., just false positives), we computed classification metrics that are widely used in multi-class tasks and that consider both types of errors [63]:  
* Recall;
* Precision;
* F\({}_{1-\text{score}}\).  
The first measure takes into account false negatives, the second one considers false positives, and the third score provides a trade-off between both measures. The recall, also known as the true-positive rate or sensitivity, assesses the proportion of instances of a particular class that the model correctly identified. In other words, the recall of a certain class is given by the formula \(TruePositives/(TruePositives+FalseNegatives)\). The precision metric, also known as the positive predictive value, measures the accuracy of the model when it predicts a particular class. Specifically, the precision of a particular class is determined by the formula \(TruePositives/(TruePositives+FalsePositives)\). We further note that there is another measure that considers false positives, the false-positive rate. However, using precision or the false-positive rate would essentially lead to the same quality measurement (i.e., assess the value of false positives). Thus, in this work, we opted to use recall since it is commonly used as a complementary measure that is associated with precision. As for the third measure, the F\({}_{1-\text{score}}\) corresponds to the harmonic mean of precision and recall accord ing to the following expression: \(2\cdot(precision\cdot recall)/(precision+recall)\). All three metrics can range from 0% to 100%, with a higher value indicating a more accurate predictor.  
The generalization capability of the ANN models was evaluated using a 5-fold cross-validation method with 5 runs [64], with the exception of the optimization phase, in which a 3-fold cross-validation method with 2 runs was used. This means that each modelling setup was trained \(3\times 5=15\) (optimization step) or \(5\times 5=25\) (modelling step) times. When compared with the simpler holdout method (single split between training and testing), the \(k\)-fold cross-validation procedure has the advantage of obtaining predictions for all the data. Under this approach, the data are randomly split into \(k\) mutually exclusive subsets with the same length. Then, a cycle with \(k\) iterations is executed, where all data except a differently selected fold are used for training. Once the model is trained, predictions are performed for the selected fold (unseen data). In the end, a total of \(k\) models are trained and tested. Thus, the measured performance measures on unseen data are more robust. The k-fold cross-validation procedure ensured that all three prediction metrics (recall, prediction, and F\({}_{1-\text{score}}\)) were always computed on the unseen test data.