# Predicting the Magnitude of Earthquakes Using Grammatical Evolution
## 3 Experimental Results
Among the models without Grammatical Evolution, LSTM and MLP-RPROP have the best performance, with an average error of around 0.24, and demonstrate decent stability at different distances. SVM has a slightly higher average error (0.282), but is also relatively stable. MLP-BP has a higher average error (0.418), with some improvement at greater distances (e.g., 0.35 at 100 miles). MLP-BFGS exhibits the worst error (average 0.802) and very high variance, particularly at short distances (0.98 at 25 miles), indicating significant instability. Distance (Dc) seems to minimally affect the error for most models (LSTM, SVM, MLP-RPROP, and the grammatical models), suggesting robustness. The significant exception is MLP-BFGS, which shows marked sensitivity to distance. In summary, the Grammatical Evolution models (RULE, NNC, FC) are clearly the most accurate and reliable for this prediction problem. Among the rest of the models, LSTM and MLP-RPROP are the best choices due to their balanced performance, while MLP-BFGS appears to be unsuitable due to high and unpredictable error. For the year 2010, the Grammatical Evolution models (RULE, NNC, FC) maintain the lowest regression error (0.17-0.19) at all distances, with NNC achieving the best average (0.176). They are more stable than most non-evolutionary models, confirming that Grammatical Evolution provides reliable predictions. Among the other models, LSTM shows the best performance (average error 0.24), with remarkable stability at all distances. MLP-RPROP has a slightly higher average error (0.256), but with greater variance, particularly at long distances (0.32 at 500 miles). SVM remains stable (average 0.298), with no significant fluctuations. MLP-BP improves at medium distances (0.31 at 100 miles), but has a higher average error (0.366). MLP-BFGS improves compared to 2004 (average error 0.548), but still exhibits significant variance and high error at short distances (0.74 at 10 miles). Distance (Dc) minimally affects most models, with the exception of MLP-BFGS and, to a lesser extent, MLP-RPROP, which show sensitivity. Overall, the Grammatical Evolution models (especially NNC) and LSTM stand out as the most reliable approaches for this prediction problem. Similarly, for 2012, the Grammatical Evolution models (RULE, NNC, FC) continue to maintain the lowest and most stable regression error at all distances. NNC and FC achieve the best average error (0.17 and 0.166 respectively), with FC demonstrating remarkable stability (0.16) at most distances. RULE has a slightly higher average (0.172). This confirms the superiority of Grammatical Evolution for this problem. Among the non-evolutionary models, LSTM stands out with the best average error (0.224) and very good stability at different distances. MLP-RPROP has a similar average (0.238), but greater variance, particularly at long distances (0.29 at 500 miles). SVM improves significantly compared to previous years (average error 0.268) and is stable. MLP-BP has the highest error (0.35) among the non-evolutionary models, with increasing error at medium distances (0.38 at 100 miles). MLP-BFGS continues to have the highest average error (0.566) and explosive variance, ranging from extremely low error (0.21 at 50 miles) to very high (0.85 at 500 miles), making it unreliable. Distance (Dc) minimally affects the grammatical models, LSTM, and SVM. MLP-BP shows sensitivity at medium distances, while MLP-RPROP and particularly MLP-BFGS show strong sensitivity at specific distances. Overall, for 2012, the grammatical models (especially FC and NNC) and LSTM stand out as the most accurate and stable approaches. MLP-BFGS remains unsuitable due to unpredictable performance, while MLP-BP has the highest error among the traditional models. There is a general improvement in SVM and in the stability of LSTM compared to previous years. In Figure 8, the grammatical models (RULE, NNC, FC) exhibit the lowest and most stable error (0.16-0.17) across all distances, clearly outperforming the others.