New Algorithm For Earthquake Prediction
New Algorithm For Earthquake Prediction
Article history Abstract: Seismic tremors are among the foremost perilous normal fiascos
Received: 07-07-2023 individuals confront due to their event without earlier caution and their
Revised: 09-09-2023 effect on their lives and properties. In expansion, to consider future disaster
Accepted: 19-10-2023 prevention measures for major earthquakes, it is necessary to predict
Corresponding Author:
earthquakes using Neural Networks (NN). A machine learning technique
Nada Badr Jarah has developed a technology to predict earthquakes from ground controller
Department of Computer data by measuring ground vibration and transmitting data by a sensor
Science, College of Computer network. Devices to process this data and record it in a catalog of seismic
Sciences and Maths, University data from 1900-2019 for Iraq and neighboring regions, then divide this data
of Kufa, Iraq into 80% training data and 20% test data. It gave better results than other
Email: [email protected] prediction algorithms, where the NN model performs better Seismic
prediction than other machine learning methods.
© 2024 Nada Badr Jarah, Abbas Hanon Hassin Alasadi and Kadhim Mahdi Hashim. This open-access article is distributed
under a Creative Commons Attribution (CC-BY) 4.0 license.
Nada Badr Jarah et al. / Journal of Computer Science 2024, 20 (2): 150.156
DOI: 10.3844/jcssp.2024.150.156
151
Nada Badr Jarah et al. / Journal of Computer Science 2024, 20 (2): 150.156
DOI: 10.3844/jcssp.2024.150.156
Table 2: The catalog of Earthquake in Iraq and surrounding regions (1900-2019) (Onur et al., 2017)
Eventide Year Month Day Time Lat Lon Depth (km) MAG Timestamp
10001 1900 2 24 06:00.0 38.45 44.8700 0.0 5.4 -2204312256
10002 1900 4 17 17:00.0 38.00 46.0000 0.0 6.2 -2200442256
10004 1901 2 6 48:00.0 33.00 49.0000 0.0 7.4 -2174266656
10005 1901 5 20 38:36.0 38.38 42.2300 10.0 5.5 -2165401296
| | | | | | | | |
| | | | | | | | |
44659 2019 12 29 28:27.4 38.8709 43.5207 14.3 2.1 -1577582824
44660 2019 12 30 56:21.8 30.8205 50.0474 10.0 3.7 -1577682728
44662 2019 12 31 50:57.3 32.4992 46.9521 10.0 2.8 -1577750223
44663 2019 12 31 49:12.8 34.7548 45.5659 12.2 2.8 -1577743923
Linear Regression covered-up layers between the two layers of the input
and the outside layer (Alves, 2006). A NN that contains
A linear regression model was applied to the Iraqi data more than one hidden layer is known as a profound
set. The result shown in Table 1. shows that the linear neural arrangement and learning is called profound
regression was not significant and could not meet any learning. Each layer has a boundless number of hubs.
useful prediction. A test showed the worst prediction, with The number of hubs within the input layer breaks even
verification values ranging from 0.114-0.252. Thus, linear with the number of input information highlights.
regression cannot predict the earthquake based on the Covered-up layers comprise a boundless number of
current data and the parameters used. Although this model hubs. The yield layer comprises as it were one hub for
was not achieved, the required prediction must use other understanding relapse issues and more than one hub for
techniques to find the best prediction (Ranjan et al., 2019). evaluating pictures, translation, audio, or solving
Random Forest Regressor classification issues (Tapia-Hernández et al., 2019). In
Table 1. Application of the above three algorithms with
It is a mechanism that generates multiple decision tree different probabilities in input and output features.
models and decides on the final prediction by the majority
vote of those models. Because each model trains using Earthquake Prediction
sub-datasets generated by splitting the original training
Seismic tremors are a portion of earth's life and an
dataset, each model exhibits slightly different prediction
appalling portion of human history and they are sudden
performance. Therefore, the more it is generated, the more
Decision tree models, the generalization ability of the unsettling influences within the earth's outside, as not a
random group as a whole increases, and the prediction year goes by without hearing handfuls of seismic tremors,
performance better (González et al., 2019). a few of them solid and destroying, wiping out whole
cities. Consequently, the issue of anticipating their event
Neural Network appears exceptionally imperative.
NN may be a machine learning strategy or Earthquake forecasting is the science of determining
calculation that attempts to reenact the working of the details of impending earthquakes in terms of the
neurons within the human brain for learning. At first, the location, magnitude, and time of the earthquake within a
results appear inaccurate and after a specific iteration of given area (Mavrodiev et al., 2018).
the data, they adjust themselves so that the results Researchers face challenges in predicting earthquakes
increase in accuracy. Moreover, each NN is organized and dealing with natural phenomena. According to the
within the frame of layers of counterfeit cells: An inward study of (Li et al., 2022), there's no valid forecast within
layer, an external layer, and layers between them, or the brief term since the reason for the short-term
152
Nada Badr Jarah et al. / Journal of Computer Science 2024, 20 (2): 150.156
DOI: 10.3844/jcssp.2024.150.156
expectation is to empower emergency measures to The data is divided into determining the input X and
diminish activity and pulverization, which leads to untrue featured three as input (latitude, longitude, and time
desires and dissatisfaction within the occasion of a critical stamp). Output Y has the features that predict them as
seismic tremor, resulting in additional losses and legal output (Magnitude and Depth), where the best-fit
penalties (Kiani et al., 2019).
parameters of the show are utilized to calculate the result
Measurable speculation testing strategies and utilizing preparing and test information.
performing machine learning approaches, to be specific
Finally, the experimental practical step applies the
polynomial calculated relapse and bolster Vector Machine
machine learning methods. The data of 44540 earthquakes
(SVM) for seismic tremor information, may be utilized in
is divided into a training set of 80% and a testing set of
classification and relapse investigation to decide the
20%. Thus, it is 33405 for training and 11135 for testing.
likelihood of a seismic tremor (Onur et al., 2017). Three types of algorithms are learned as follows.
Proposed Algorithm In the beginning, two types of linear regression are
used: The first method of ML, which starts with Linear
The first step of the proposed algorithm reads the
Regression to start predicting the data in the first
earthquake data file in Iraq and the surrounding area from
experiment of the model and according to the instruction reg,
1900-2019, As in Table 2.
fit and it contains the Train and y-train and the expectation is
Furthermore, the second step is data preprocessing,
test. It means that the random forest regress or model or
which represents the six main features in earthquake data:
machine learning method is not successful.
Earthquake date (year, month, and day), time, longitude,
Secondly, using the second ML method, which is
latitude, depth, and earthquake strength.
random forest regress, and applying the training process,
The date and time data in this mechanism are not
testing on test and Y_testand when implementing. The
considered digital data. They cannot be addressed in a
credibility of 0.6 is fitted, meaning that the model fails.
completed program owing to the complexity of the
Furthermore, the expected values are not correct.
format, the reading process, and the training process with
Finally, the third method, NN, includes model building
the existence of (:) In time. So, it is changed to digital data
and model execution, i.e., building the model first, and
only, i.e., to Unix time, which is in seconds, where it can
after preparing it, implementing it. The model is in two
be easily used as an input to the network we have created.
types: The main one always used is called sequential and
By merging the date and time data, converting its
the dense is the starting point of the model, so the model
FORMAT, storing it in a variable called time stamp, and
type is sequential and adding the first layer, which is
adding it to the database, they all were negative because
dense and needs activation and loss function and Input
they represent the past time.
shape = 3, so it has three entries for this model.
Thus, the data will be dealt with after processing to be:
Thus, building an NN model, according to the above
Time stamp, longitude, latitude, depth, and earthquake
method, has several features, namely: Loss function,
strength. Part of it can be illustrated in Table 3.
optimizer, activation, and metrics that represent four
The locations of earthquakes in the study area are
variables that must be implemented to build this model
indicated on the map, as shown in Fig. 2 (Wathiq et al., 2020).
here we have a process based on this data, the model
A fundamental problem appeared, which is the missing
should give the best options because there are several
data. Each implementation gives a significant error rate and
options, that is, Building the model requires several
the model cannot be trained. Therefore, a mechanism was
factors, namely:
adopted to delete all the missing data whose value is null to
filter the earthquakes in Iraq. We used them in the training
process and 123 rows were deleted. a) The batch size can be either 10, 20, 50, or 100
The third step signifies the application of the b) Activation may be one of the following options:
algorithm; when the database is ready to form step two, 'Relu', 'tanh', 'sigmoid', 'hard sigmoid', 'linear ', and
data has been read and arranged to determine the fields 'exponential'
that will be worked upon in the data Table 3. It has c) Optimizer, in which the result is checked for each
become limited to only five variables. cell. If it is weak, it returns to the input, adjusts
The third step signifies the application of the the weights, and repeats the process of checking
algorithm; when the database is ready to form step two, the output. It has several types: ('Stochastic
data has been read and arranged to determine the fields Gradient Descent (SGD)', 'RMSprop', 'Adagrad',
that will be worked upon in the data Table 3. It has 'Adadelta', ' Adam', 'Adamax', 'And Nadam') and
become limited to only five variables. each has several options
153
Nada Badr Jarah et al. / Journal of Computer Science 2024, 20 (2): 150.156
DOI: 10.3844/jcssp.2024.150.156
Table 3: Part of the essential data for earthquakes in Iraq from 1900-2019
154
Nada Badr Jarah et al. / Journal of Computer Science 2024, 20 (2): 150.156
DOI: 10.3844/jcssp.2024.150.156
Author’s Contributions
Nada Badr Jarah: Collect data and written the research.
Abbas Hanon Hassin Alasadi: The idea of research,
designed and analysis of data.
Kadhim Mahdi Hashim: Written the program and
analyzing the results.
Ethics
Fig. 5: Earthquake prediction model building
This article is original and contains unpublished
Results and Discussion material. The corresponding author confirms that all of the
other authors have read and approved the manuscript and
The results of applying the three machine learning no ethical issues involved.
algorithms, namely LR, RFR, and NN, to earthquake data
in Iraq and the surrounding areas are as shown in Table 1.
References
The five features of earthquakes used in this study were
switched, and Fig. 4 shows the accuracy in using the three Alves, E. I. (2006). Earthquake forecasting using neural
algorithms to predict earthquakes. networks: Results and future work. Nonlinear
Dynamics, 44, 341-349.
Conclusion https://doi.org/10.1007/s11071-006-2018-1
Asencio-Cortés, G., Morales-Esteban, A., Shang, X., &
In recent years, Iraq has witnessed continuous
activity of earthquakes in the governorates of Iraq. This Martínez-Álvarez, F. (2018). Earthquake prediction
study is considered a major challenge and its data are in California using regression algorithms and cloud-
limited, as we need a larger number of inputs to obtain based big data infrastructure. Computers and
an accurate prediction of the outputs. In this study, we Geosciences, 115, 198-210.
find that the number of inputs is 3 and the number of https://doi.org/10.1016/j.cageo.2017.10.011
outputs is 2. The highest number of inputs was Asim, K. M., Idris, A., Iqbal, T., & Martínez-Álvarez, F.
achieved. The accuracy result of the machine learning (2018). Earthquake prediction model using support
models, which is the neural network, reached about vector regress or hybrid neural networks. PloS
0.839 using the seismic data catalog in Iraq and the One, 13(7), e0199004.
surrounding areas for 119 years (1900-2019). The https://doi.org/10.1371/journal.pone.0199004
inputs are Timestamp, Depth, and Longitude to predict Bangar, P., Gupta, D., Gaikwad, S., Marekar, B., &
Magnitude and Latitude. The proposed model was Pati, J. (2020). Earthquake prediction using
compared with models proposed by others, we found machine learning algorithm. International Journal
that the proposed model achieves appropriate accuracy of Recent Technology and Engineering
depending on the number of training features available (IJRTE), 8(6), 4684-4688.
as well as the size of the data set. https://doi.org/10.35940/ijrte.E9110.018620
155
Nada Badr Jarah et al. / Journal of Computer Science 2024, 20 (2): 150.156
DOI: 10.3844/jcssp.2024.150.156
Bilal, M. A., Ji, Y., Wang, Y., Akhter, M. P., & Yaqub, Mavrodiev, S. C., Pekevski, L., Botev, E., Pinar, A.,
M. (2022). An early warning system for earthquake Kikuashvili, G., & Gilat, A. (2018). Study of the
prediction from seismic data using Batch Normalized Possibility of Predicting Earthquakes. International
Graph Convolutional Neural Network with Attention Journal of Geosciences, 9(12), 688-706.
Mechanism (BNGCNNATT). Sensors, 22(17), 6482. https://doi.org/10.4236/ijg.2018.912042
https://doi.org/10.3390/s22176482 Onur, T., Gök, R., Abdulnaby, W., Mahdi, H., Numan, N.
Fernandes, M., Corchado, J. M., & Marreiros, G. (2022). M., Al‐Shukri, H., ... & Abd, N. A. (2017). A
Machine learning techniques applied to mechanical comprehensive earthquake catalog for Iraq in terms
fault diagnosis and fault prognosis in the context of of moment magnitude. Seismological Research
real industrial manufacturing use-cases: A systematic Letters, 88(3), 798-811.
literature review. Applied Intelligence, 52(12), https://doi.org/10.1785/0220160078
14246-14280. Probst, P., & Boulesteix, A. L. (2017). To tune or not to tune
https://doi.org/10.1007/s10489-022-03344-3 the number of trees in random forest. The Journal of
González, J., Yu, W., & Telesca, L. (2019). Earthquake Machine Learning Research, 18(1), 6673-6690.
magnitude prediction using recurrent neural https://www.jmlr.org/papers/volume18/17-269/17-269.pdf
networks. Multidisciplinary Digital Publishing Ranjan, G. S. K., Verma, A. K., & Radhika, S. (2019). K-
Institute Proceedings, 24(1), 22. nearest neighbors and grid search cv based real time
https://doi.org/10.3390/IECG2019-06213 fault monitoring system for industries. In 2019 IEEE
Jarah, N. B., Hashim, K. M., & Alasadi, A. H. (2023). 5th International Conference for Convergence in
Earthquake prediction in Iraq using machine learning Technology (I2CT) (pp. 1-5). IEEE.
techniques Indonesian. Journal of Electrical https://doi.org/10.1109/I2CT45611.2019.9033691
Engineering and Computer Science, vol. 29, no. 1, Rouet‐Leduc, B., Hulbert, C., Lubbers, N., Barros, K.,
pp. 322-329. Humphreys, C. J., & Johnson, P. A. (2017).
https://doi.org/10.11591/ijeecs.v29.i1.pp322-329 Machine learning predicts laboratory
Kiani, J., Camp, C., & Pezeshk, S. (2019). On the earthquakes. Geophysical Research Letters,
application of machine learning techniques to derive 44(18), 9276-9282.
seismic fragility curves. Computers and Structures, https://doi.org/10.1002/2017GL074677
218, 108-122. Sathwik, G., Patil, V. S. S. Br, Vishesh, S. Yatish, J.
https://doi.org/10.1016/j.compstruc.2019.03.004 Soham S. (2022). Machine Learning Approach for
Li, L., Kang, Y., Petropoulos, F., & Li, F. (2022). Feature-
Predicting Earthquakes in a Geographic Location.
based intermittent demand forecast combinations:
International Journal of Advanced Research in
Accuracy and inventory implications. International
Journal of Production Research, 1-16. Computer and Communication Engineering
https://doi.org/10.1016/j.ijforecast.2021.11.001 (IJARCCE), vol. 11, no. 11, pp. 110-115.
Liu, H., Liu, Z., Liu, S., Liu, Y., Bin, J., Shi, F., & Dong, https://doi.org/10.17148/IJARCCE.2022.111122
H. (2018). A nonlinear regression application via Tapia-Hernández, E., Reddy, E. A., & Oros-Avilés, L.
machine learning techniques for geomagnetic data J. (2019). Earthquake predictions and scientific
reconstruction processing. IEEE Transactions on forecast: Dangers and opportunities for a technical
Geoscience and Remote Sensing, 57(1), 128-140. and anthropological perspective. Earth Sciences
https://doi.org/10.1109/TGRS.2018.2852632 Research Journal, 23(4), 309-315.
Mallouhy, R., Abou Jaoude, C., Guyeux, C., & Makhoul, https://doi.org/10.15446/esrj.v23n4.77206
A. (2020). Major earthquake event prediction using
Wathiq, A., Tuna, O., Rengin, G., Shakir, A. M., Hanan,
various machine learning algorithms. In 2019
International Conference on Information and M., Al-Shukri, H., ... & Ali, R. (2020). Probabilistic
Communication Technologies for Disaster seismic hazard assessment for Iraq. Journal of
Management (ICT-DM) (pp. 1-7). IEEE. Seismology, 24(3), 595-611.
https://doi.org/10.1109/ICTDM47966.2019.9032983 https://doi.org/10.1007/s10950-020-09919-2
156